Search Results

Search found 774 results on 31 pages for 'classpath'.

Page 10/31 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • log file not generated while accessing a jar having log4j support.

    - by naveen garimella
    I have a x.jar which is being used by some client y.jar. Both x.jar and y.jar are at the same package level. i have put the log4j.xml at the same package level. But the log file is never generated. Can i know why? I have tried few other options as well but no luck till now. i have added log4j-1.2.16.jar to ClassPath: variable in manifest files of both x.jar and y.jar. Put log4j.xml at the class level of y.jar which actually calls the x.jar classes. package structure is as follows: x.jar --manifest.mf has a entry ClassPath:log4j-1.2.16.jar y.jar --manifest.mf has a entry ClassPath:log4j-1.2.16.jar log4j-1.2.16.jar log4j.xml --has a RollingFileAppender. Can any one suggest whether i am missing anything?

    Read the article

  • Multi-module web project with Spring and Maven

    - by Johan Sjöberg
    Assume we have a few projects, each containing some web resources (e.g., html pages). parent.pom +- web (war) +- web-plugin-1 (jar) +- web-plugin-2 (jar) ... Let's say web is the deployable war project which depends on the known, but selectable, set of plugins. What is a good way to setup this using Spring and maven? Let the plugins be war projects and use mavens poor support for importing other war projects Put all web-resource for all plugins in the web project Add all web-resources to the classpath of all jar web-plugin-* dependencie and let spring read files from respective classpath? Other? I've previously come from using #1, but the copy-paste semantics of war dependencies in maven is horrible.

    Read the article

  • Command line options style - POSIX or what?

    - by maaartinus
    Somewhere I saw a rant against java/javac allegedly using a mix of Windows and Unix style like java -classpath ... -ea ... Something IMHO, it is no mix, it's just like find works as well, isn't it? AFAIK, according to POSIX, the syntax should be like java --classpath ... --ea ... Something and -abcdef would mean specifying 6 short options at once. I wonder which version leads in general to less typing and less errors. I'm writing a small utility in Java and in no case I'm going to use Windows style /a /b since I'm interested primarily in Unix. What style should I choose?

    Read the article

  • java.lang.IllegalAccessException during Ant jwsc webservice build

    - by KevB
    Hi. I have a large application, part of which relies on a set of 3 webservices. I'm currently in the process of writing an Ant build script to build and package the application into an EAR file. When building the web sub-project for this application I use the <jwsc> task in Ant to compile the webservices. This causes an IllegalAccessException, as outlined in the stack trace below: [jwsc] warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds [jwsc] JWS: processing module weboutput [jwsc] Parsing source files [jwsc] Parsing source files [jwsc] 3 JWS files being processed for module weboutput [jwsc] JWS: C:\dev\ir\irWeb\src\webservices\DailyRun.java Validated. [jwsc] JWS: C:\dev\ir\irWeb\src\webservices\PendingRegistrationsSweep.java Validated. [jwsc] JWS: C:\dev\ir\irWeb\src\webservices\RegistrationsGoLive.java Validated. [jwsc] Compiling 6 source files to C:\DOCUME~1\KEVIN~1.BRE\LOCALS~1\Temp\_5l950r [jwsc] An exception has occurred in the compiler (1.6.0_23). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport) after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report. Thank you. [jwsc] java.lang.IllegalAccessError: tried to access class com.sun.tools.javac.jvm.ClassReader$AnnotationDefaultCompleter from class com.sun.tools.javac.jvm.ClassReader [jwsc] at com.sun.tools.javac.jvm.ClassReader.attachAnnotationDefault(ClassReader.java:1128) [jwsc] at com.sun.tools.javac.jvm.ClassReader.readMemberAttr(ClassReader.java:906) [jwsc] at com.sun.tools.javac.jvm.ClassReader.readMemberAttrs(ClassReader.java:1027) [jwsc] at com.sun.tools.javac.jvm.ClassReader.readMethod(ClassReader.java:1490) [jwsc] at com.sun.tools.javac.jvm.ClassReader.readClass(ClassReader.java:1586) [jwsc] at com.sun.tools.javac.jvm.ClassReader.readClassFile(ClassReader.java:1658) [jwsc] at com.sun.tools.javac.jvm.ClassReader.fillIn(ClassReader.java:1845) [jwsc] at com.sun.tools.javac.jvm.ClassReader.complete(ClassReader.java:1777) [jwsc] at com.sun.tools.javac.code.Symbol.complete(Symbol.java:386) [jwsc] at com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:763) [jwsc] at com.sun.tools.javac.jvm.ClassReader.loadClass(ClassReader.java:1951) [jwsc] at com.sun.tools.javac.comp.Resolve.loadClass(Resolve.java:842) [jwsc] at com.sun.tools.javac.comp.Resolve.findIdentInPackage(Resolve.java:1011) [jwsc] at com.sun.tools.javac.comp.Attr.selectSym(Attr.java:1921) [jwsc] at com.sun.tools.javac.comp.Attr.visitSelect(Attr.java:1835) [jwsc] at com.sun.tools.javac.tree.JCTree$JCFieldAccess.accept(JCTree.java:1522) [jwsc] at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:360) [jwsc] at com.sun.tools.javac.comp.Attr.attribType(Attr.java:390) [jwsc] at com.sun.tools.javac.comp.MemberEnter.attribImportType(MemberEnter.java:681) [jwsc] at com.sun.tools.javac.comp.MemberEnter.visitImport(MemberEnter.java:545) [jwsc] at com.sun.tools.javac.tree.JCTree$JCImport.accept(JCTree.java:495) [jwsc] at com.sun.tools.javac.comp.MemberEnter.memberEnter(MemberEnter.java:387) [jwsc] at com.sun.tools.javac.comp.MemberEnter.memberEnter(MemberEnter.java:399) [jwsc] at com.sun.tools.javac.comp.MemberEnter.visitTopLevel(MemberEnter.java:512) [jwsc] at com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:446) [jwsc] at com.sun.tools.javac.comp.MemberEnter.memberEnter(MemberEnter.java:387) [jwsc] at com.sun.tools.javac.comp.MemberEnter.complete(MemberEnter.java:819) [jwsc] at com.sun.tools.javac.code.Symbol.complete(Symbol.java:386) [jwsc] at com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:763) [jwsc] at com.sun.tools.javac.comp.Enter.complete(Enter.java:464) [jwsc] at com.sun.tools.javac.comp.Enter.main(Enter.java:442) [jwsc] at com.sun.tools.javac.main.JavaCompiler.enterTrees(JavaCompiler.java:819) [jwsc] at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:727) [jwsc] at com.sun.tools.javac.main.Main.compile(Main.java:353) [jwsc] at com.sun.tools.javac.main.Main.compile(Main.java:279) [jwsc] at com.sun.tools.javac.main.Main.compile(Main.java:270) [jwsc] at com.sun.tools.javac.Main.compile(Main.java:69) [jwsc] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [jwsc] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [jwsc] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [jwsc] at java.lang.reflect.Method.invoke(Method.java:597) [jwsc] at org.apache.tools.ant.taskdefs.compilers.Javac13.execute(Javac13.java:56) [jwsc] at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:1097) [jwsc] at weblogic.wsee.tools.anttasks.DelegatingJavacTask$ExposingJavac.compile(DelegatingJavacTask.java:343) [jwsc] at weblogic.wsee.tools.anttasks.DelegatingJavacTask.compile(DelegatingJavacTask.java:286) [jwsc] at weblogic.wsee.tools.anttasks.JwscTask.javac(JwscTask.java:335) [jwsc] at weblogic.wsee.tools.anttasks.JwsModule.compile(JwsModule.java:390) [jwsc] at weblogic.wsee.tools.anttasks.JwsModule.build(JwsModule.java:262) [jwsc] at weblogic.wsee.tools.anttasks.JwscTask.execute(JwscTask.java:227) [jwsc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) [jwsc] at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) [jwsc] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [jwsc] at java.lang.reflect.Method.invoke(Method.java:597) [jwsc] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) [jwsc] at org.apache.tools.ant.Task.perform(Task.java:348) [jwsc] at org.apache.tools.ant.Target.execute(Target.java:390) [jwsc] at org.apache.tools.ant.Target.performTasks(Target.java:411) [jwsc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397) [jwsc] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38) [jwsc] at org.apache.tools.ant.Project.executeTargets(Project.java:1249) [jwsc] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442) [jwsc] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105) [jwsc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) [jwsc] at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) [jwsc] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [jwsc] at java.lang.reflect.Method.invoke(Method.java:597) [jwsc] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) [jwsc] at org.apache.tools.ant.Task.perform(Task.java:348) [jwsc] at org.apache.tools.ant.Target.execute(Target.java:390) [jwsc] at org.apache.tools.ant.Target.performTasks(Target.java:411) [jwsc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397) [jwsc] at org.apache.tools.ant.Project.executeTarget(Project.java:1366) [jwsc] at com.bea.workshop.cmdline.antlib.AntExTask.execute(AntExTask.java:406) [jwsc] at com.bea.workshop.cmdline.antlib.AntCallExTask.execute(AntCallExTask.java:118) [jwsc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) [jwsc] at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) [jwsc] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [jwsc] at java.lang.reflect.Method.invoke(Method.java:597) [jwsc] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) [jwsc] at org.apache.tools.ant.Task.perform(Task.java:348) [jwsc] at org.apache.tools.ant.Target.execute(Target.java:390) [jwsc] at org.apache.tools.ant.Target.performTasks(Target.java:411) [jwsc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397) [jwsc] at org.apache.tools.ant.Project.executeTarget(Project.java:1366) [jwsc] at com.bea.workshop.cmdline.antlib.AntExTask.execute(AntExTask.java:406) [jwsc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) [jwsc] at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) [jwsc] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [jwsc] at java.lang.reflect.Method.invoke(Method.java:597) [jwsc] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) [jwsc] at org.apache.tools.ant.Task.perform(Task.java:348) [jwsc] at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68) [jwsc] at net.sf.antcontrib.logic.IfTask.execute(IfTask.java:217) [jwsc] at sun.reflect.GeneratedMethodAccessor44.invoke(Unknown Source) [jwsc] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [jwsc] at java.lang.reflect.Method.invoke(Method.java:597) [jwsc] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) [jwsc] at org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:154) [jwsc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) [jwsc] at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) [jwsc] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [jwsc] at java.lang.reflect.Method.invoke(Method.java:597) [jwsc] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) [jwsc] at org.apache.tools.ant.Task.perform(Task.java:348) [jwsc] at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68) [jwsc] at net.sf.antcontrib.logic.IfTask.execute(IfTask.java:197) [jwsc] at sun.reflect.GeneratedMethodAccessor44.invoke(Unknown Source) [jwsc] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [jwsc] at java.lang.reflect.Method.invoke(Method.java:597) [jwsc] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) [jwsc] at org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:154) [jwsc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) [jwsc] at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) [jwsc] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [jwsc] at java.lang.reflect.Method.invoke(Method.java:597) [jwsc] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) [jwsc] at org.apache.tools.ant.Task.perform(Task.java:348) [jwsc] at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68) [jwsc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) [jwsc] at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) [jwsc] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [jwsc] at java.lang.reflect.Method.invoke(Method.java:597) [jwsc] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) [jwsc] at org.apache.tools.ant.Task.perform(Task.java:348) [jwsc] at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:398) [jwsc] at net.sf.antcontrib.logic.ForTask.doSequentialIteration(ForTask.java:259) [jwsc] at net.sf.antcontrib.logic.ForTask.doToken(ForTask.java:268) [jwsc] at net.sf.antcontrib.logic.ForTask.doTheTasks(ForTask.java:299) [jwsc] at net.sf.antcontrib.logic.ForTask.execute(ForTask.java:244) [jwsc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) [jwsc] at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) [jwsc] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [jwsc] at java.lang.reflect.Method.invoke(Method.java:597) [jwsc] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) [jwsc] at org.apache.tools.ant.Task.perform(Task.java:348) [jwsc] at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68) [jwsc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) [jwsc] at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) [jwsc] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [jwsc] at java.lang.reflect.Method.invoke(Method.java:597) [jwsc] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) [jwsc] at org.apache.tools.ant.Task.perform(Task.java:348) [jwsc] at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:398) [jwsc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) [jwsc] at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) [jwsc] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [jwsc] at java.lang.reflect.Method.invoke(Method.java:597) [jwsc] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) [jwsc] at org.apache.tools.ant.Task.perform(Task.java:348) [jwsc] at org.apache.tools.ant.Target.execute(Target.java:390) [jwsc] at org.apache.tools.ant.Target.performTasks(Target.java:411) [jwsc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397) [jwsc] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38) [jwsc] at org.apache.tools.ant.Project.executeTargets(Project.java:1249) [jwsc] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442) [jwsc] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105) [jwsc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) [jwsc] at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) [jwsc] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [jwsc] at java.lang.reflect.Method.invoke(Method.java:597) [jwsc] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) [jwsc] at org.apache.tools.ant.Task.perform(Task.java:348) [jwsc] at org.apache.tools.ant.Target.execute(Target.java:390) [jwsc] at org.apache.tools.ant.Target.performTasks(Target.java:411) [jwsc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397) [jwsc] at org.apache.tools.ant.Project.executeTarget(Project.java:1366) [jwsc] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) [jwsc] at org.apache.tools.ant.Project.executeTargets(Project.java:1249) [jwsc] at org.apache.tools.ant.Main.runBuild(Main.java:801) [jwsc] at org.apache.tools.ant.Main.startAnt(Main.java:218) [jwsc] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280) [jwsc] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109) [AntUtil.deleteDir] Deleting directory C:\DOCUME~1\KEVIN~1.BRE\LOCALS~1\Temp_5l950r The Ant target that uses the <jwsc> task is this: <target name="webservice.build" depends="init,generated.root.init"> <path id="jwsc.srcpath"> <path path="${java.sourcepath}" /> <pathelement path="build/assembly/.src" /> </path> <taskdef name="jwsc" classname="weblogic.wsee.tools.anttasks.JwscTask" > <classpath> <path refid="weblogic.jar.classpath" /> </classpath> </taskdef> <property name="jwsc.module.root" value="${project.dir}/build/weboutput"/> <property name="jwsc.contextpath" value="irWeb"/> <property name="jwsc.srcpath.prop" refid="jwsc.srcpath"/> <path id="jwsc.classpath"> <path refid="weblogic.jar.classpath" /> <path refid="java.classpath" /> <pathelement path="${java.outpath}" /> </path> <jwsc destdir="${project.dir}/build" classpathref="jwsc.classpath"> <module name="weboutput" explode="true" contextPath="${jwsc.contextpath}" > <jwsFileSet srcdir="${webservices.dir}" type="JAXRPC"> <include name="**/*.java"/> </jwsFileSet> <descriptor file="${jwsc.module.root}/WEB-INF/web.xml" /> <descriptor file="${jwsc.module.root}/WEB-INF/weblogic.xml" /> </module> </jwsc> </target> I have no idea what could be causing the compiler to throw this error at build time, and a day of google searching has turned up other instances of this error caused by different triggers, and solutions for those propblems didn't work for me. I also found a single report on the Oracle forums that seemed to be a carbon copy of this issue, but there were no replies. The application is written in Weblogic Workshop 10, runs on Weblogic Server 10.3, and uses Beehive / NetUI. Not sure if that would make a difference or not though. The build scripts were automatically generated by Weblogic Workshop, with some tweaks and fixes made to other aspects of the files by myself to fix other compatability issues. I am using Java 1.6.0_23 from Sun, and Ant 1.8.1 Any help or advice would be greatly appreciated.

    Read the article

  • Weblogic 12 and the CLI

    - by Rig
    I am working with WebLogic on Fedora 19 and am attempting to use the CLI tools to no avail. It appears these were deprecated as far back as WebLogic 9 however I was assured they are still there and still functional. As it stands I have a need to use them if they are in fact functional. What appears to the case is that the weblogic jar file is not being loaded correctly to the classpath by this script after trying to manually add it to the classpath as it fails when trying to add those jars via java -classpath <path>. I've spent a lot of time so far trying to get this sorted out but I'm wondering what I may be missing here. My Java runtime is version 7, Fedora is 19, and WebLogic is 12.1. When I run env after running the provided set environment script it appears to have no impact from what I can see. (I'll add that later when I get back to that machine). I'm mostly a Windows developer so some of this is a topic I'm not well versed in. [foo@localhost bin]$ ./setDomainEnv.sh [foo@localhost bin]$ java weblogic.Admin -url t3://localhost:7001 -username <username> -password <password> HELP Error: Could not find or load main class weblogic.Admin [foo@localhost bin]$ ls -ltar total 72 drwxr-x--- 2 foo foo 4096 Jun 2 07:36 service_migration drwxr-x--- 2 foo foo 4096 Jun 2 07:36 server_migration drwxr-x--- 2 foo foo 4096 Jun 2 07:36 nodemanager -rwxr-x--- 1 foo foo 1267 Jun 2 07:36 setStartupEnv.sh -rwxr-x--- 1 foo foo 1105 Jun 2 07:36 startNodeManager.sh -rwxr-x--- 1 foo foo 5765 Jun 2 07:36 startWebLogic.sh -rwxr-x--- 1 foo foo 2001 Jun 2 07:36 stopWebLogic.sh -rwxr-x--- 1 foo foo 3170 Jun 2 07:36 startManagedWebLogic.sh -rwxr-x--- 1 foo foo 2776 Jun 2 07:36 stopManagedWebLogic.sh -rwxrwxrwx 1 foo foo 14136 Jun 2 07:36 setDomainEnv.sh -rwxr-x--- 1 foo foo 2060 Jun 2 07:36 startComponent.sh drwxr-x--- 5 foo foo 4096 Jun 2 07:36 . -rwxr-x--- 1 foo foo 1726 Jun 2 07:36 stopComponent.sh drwxr-x--- 12 foo foo 4096 Jun 2 07:45 ..

    Read the article

  • How to get MSBuild Exec to run a java program?

    - by Vaccano
    I am trying to run a command line action in my Team Build (MSBuild). When I run it on the command line of the build machine it works fine. But when run in the build script I get a "exited with code 3". This is command that I am running: C:\Program Files\Wavelink\Avalanche\PackageBuilder.\jresdk\bin\java -classpath "WLUtil.jar;WLPackageBuilder.jar" com.wavelink.buildpkg.AvalanchePackageBuilder /build PackageName This command only works when run from the above directory (I have tried running it from c:\ with the full path at it fails). When I try to run it using ms build this is my statement: <PropertyGroup> <!--Working directory of the Package Builder Call--> <PkgBldWorkingDir>&quot;C:\Program Files\Wavelink\Avalanche\PackageBuilder&quot;</PkgBldWorkingDir> <!--Command line to run to make Package builder "go"--> <PkgBldRun>.\jresdk\bin\java&quot; -classpath &quot;WLUtil.jar;WLPackageBuilder.jar&quot; com.wavelink.buildpkg.AvalanchePackageBuilder</PkgBldRun> </PropertyGroup> <!--Run package builder command line to update the Ava File.--> <Exec ContinueOnError="true" WorkingDirectory="$(PackageBuilderWorkingDir)" Command="$(PkgBldRun) /build PackageName"/> As I said above this "exits with code 3". This is the full output: Task "Exec" Command: .\jresdk\bin\java -classpath "WLUtil.jar;WLPackageBuilder.jar" com.wavelink.buildpkg.AvalanchePackageBuilder /build PackageName The system cannot find the path specified. MSBUILD : warning MSB3073: The command ".\jresdk\bin\java -classpath "WLUtil.jar;WLPackageBuilder.jar" com.wavelink.buildpkg.AvalanchePackageBuilder /build PackageName" exited with code 3. The previous error was converted to a warning because the task was called with ContinueOnError=true. Build continuing because "ContinueOnError" on the task "Exec" is set to "true". Done executing task "Exec" -- FAILED. It says it can't find the file (who knows what file). I have tried it with and without the quotes (") in the working directory and with a full path as the command (gives the same error as when run on the command line). Any ideas on how to make this run a command line action in MS Build?

    Read the article

  • Glassfishv3 and log4j

    - by Jackson
    Hi... I´m using glassfishv3 for few days. But i don´t know how to get log4j working with the v3. In glassfishv2 there was a "System Classpath" field which you could used in order to point to your log4j.properties file. But in glassfishv3 "System Classpath" is not supported any more. So where i have to put the log4j.properties file on glassfishv3??? Thanks

    Read the article

  • Getting no class def found error. Log4J -> Java

    - by Nitesh Panchal
    Hello, I created a simple web application and added log4J's jar in my lib folder and it seems to work fine. Then i created a Ejb module and did the same thing of adding jar file in my classpath, but i am getting this error :- Caused by: javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean: java.lang.NoClassDefFoundError: org/apache/log4j/Logger at com.sun.ejb.containers.BaseContainer.checkExceptionClientTx(BaseContainer.java:4929) at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4761) at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1955) ... 94 more Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Logger at common.Utils.getRssFeed(Utils.java:128) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1052) at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1124) at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:5243) at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:615) at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:797) at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:567) at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doAround(SystemInterceptorProxy.java:157) at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:139) at sun.reflect.GeneratedMethodAccessor102.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:858) at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:797) at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:367) at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5215) at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5203) at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:190) ... 92 more I don't even have any other version of log4j in classpath. Any idea why is this error coming? Actually first i created a Enterprise application and everything seemed to work fine. But then, i copied files from my enterprise application's ejb module to a separate module and since then these errors are coming. This is in my build-impl.xml :- <target depends="compile" name="library-inclusion-in-archive"> <copyfiles files="${libs.Log4J.classpath}" todir="${build.classes.dir}"/> </target> <target depends="compile" name="library-inclusion-in-manifest"> <copyfiles files="${libs.Log4J.classpath}" todir="${dist.ear.dir}/lib"/> <manifest file="${build.ear.classes.dir}/META-INF/MANIFEST.MF" mode="update"/> </target> Don't know why is this pointing to ear instead of jar. Is there any problem with the above statement? How do i resolve this? I am using Netbeans 6.8 Thanks in advance :)

    Read the article

  • No tests found with test runner 'JUnit 4'

    - by lamisse
    Hello , my java test worked well from Eclipse ,I do not know I relaunch test from run menu and then have the following message: No tests found with test runner 'JUnit 4' In the .classpath file I have all jar files, and at the end have : <classpathentry exported="true" kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/> <classpathentry kind="output" path="bin"/> </classpath> please help!

    Read the article

  • run jsf application with myeclipse and jboss server

    - by chetan
    I develop simple jsf login application,that use icefaces component but, when I tries to run it in jboss server I got following error. Can't find TLD for location [http://java.sun.com/jsf/core]. JAR containing the TLD may not be in the classpath Can't find TLD for location [http://java.sun.com/jsf/html]. JAR containing the TLD may not be in the classpath

    Read the article

  • Is it possible to use .properties files in web.xml in conjunction with contextConfigLocation paramet

    - by Vladimir
    Here is part of my web.xml: <context-param> <param-name>contextConfigLocation</param-name> <param-value> classpath:application-config.xml </param-value> </context-param> application-config.xml uses property placeholder: <context:property-placeholder location="classpath:properties/db.properties"/> Is it possible somehow to define which properties file to use in web.xml rather than in application-config.xml?

    Read the article

  • How to modularize a JSF/Facelets/Spring application with OSGi?

    - by lexicore
    I'm working with very large JSF/Facelets applications which use Spring for DI/bean management. My applications have modular structure and I'm currently looking for approaches to standardize the modularization. My goal is to compose a web application from a number of modules (possibly depending on each other). Each module may contain the following: Classes; Static resources (images, CSS, scripts); Facelet templates; Managed beans - Spring application contexts, with request, session and application-scoped beans (alternative is JSF managed beans); Servlet API stuff - servlets, filters, listeners (this is optional). What I'd like to avoid (almost at all costs) is the need to copy or extract module resources (like Facelets templates) to the WAR or to extend the web.xml for module's servlets, filters, etc. It must be enough to add the module (JAR, bundle, artifact, ...) to the web application (WEB-INF/lib, bundles, plugins, ...) to extend the web application with this module. Currently I solve this task with a custom modularization solution which is heavily based on using classpath resources: Special resources servlet serves static resources from classpath resources (JARs). Special Facelets resource resolver allows loading Facelet templates from classpath resources. Spring loads application contexts via the pattern classpath*:com/acme/foo/module/applicationContext.xml - this loads application contexts defined in module JARs. Finally, a pair of delegating servlets and filters delegate request processing to the servlets and filters configured in Spring application contexts from modules. Last days I read a lot about OSGi and I was considering, how (and if) I could use OSGi as a standardized modularization approach. I was thinking about how individual tasks could be solved with OSGi: Static resources - OSGi bundles which want to export static resources register a ResourceLoader instances with the bundle context. A central ResourceServlet uses these resource loaders to load resources from bundles. Facelet templates - similar to above, a central ResourceResolver uses services registered by bundles. Managed beans - I have no idea how to use an expression like #{myBean.property} if myBean is defined in one of the bundles. Servlet API stuff - use something like WebExtender/Pax Web to register servlets, filters and so on. My questions are: Am I inventing a bicycle here? Are there standard solutions for that? I've found a mentioning of Spring Slices but could not find much documentation about it. Do you think OSGi is the right technology for the described task? Is my sketch of OSGI application more or less correct? How should managed beans (especially request/session scope) be handled? I'd be generally graefult for your comments.

    Read the article

  • Ant + JUnit = ClassNotFoundExceptions when running tests?

    - by rfkrocktk
    I'm trying to run some tests in Ant presently using JUnit, and all of my tests are failing with the following stacktrace: java.lang.ClassNotFoundException: com.mypackage.MyTestCase It doesn't make too much sense to me. I'm first compiling my test cases using <javac>, then directly running the <junit> task to run the tests. My buildfile looks like this: <target name="compile.webapp.tests"> <javac srcdir="${test.java.src.dir}" destdir="${test.java.bin.dir}"> <classpath> <filelist> <file name="${red5.home}/red5.jar"/> <file name="${red5.home}/boot.jar"/> <file name="${bin.dir}/${ant.project.name}.jar"/> </filelist> <fileset dir="${red5.lib.dir}" includes="**/*"/> <fileset dir="${main.java.lib.dir}" includes="**/*"/> <fileset dir="${test.java.lib.dir}" includes="**/*"/> </classpath> </javac> </target> <target name="run.webapp.tests"> <junit printsummary="true"> <classpath> <filelist> <file name="${red5.home}/red5.jar"/> <file name="${red5.home}/boot.jar"/> <file name="${bin.dir}/${ant.project.name}.jar"/> </filelist> <fileset dir="${red5.lib.dir}" includes="**/*.jar"/> <fileset dir="${main.java.lib.dir}" includes="**/*.jar"/> <fileset dir="${test.java.lib.dir}" includes="**/*.jar"/> </classpath> <formatter type="xml"/> <batchtest todir="${test.java.output.dir}"> <fileset dir="${test.java.bin.dir}" includes="**/*TestCase*"/> </batchtest> </junit> </target> This is really weird, I can't seem to fix this. Is there something I'm doing wrong here?

    Read the article

  • Including hibernate jar dependencies in ant build

    - by Patrick
    Hi, I'm trying to compile a runnable jar-file for a project that makes use of hibernate. I'm trying to construct an ant build.xml file to streamline my build process, but I'm having troubles with the inclusion of the hibernate3.jar inside the final jar-file. If I run the ant script I manage to include all my library jars, and they are put in the final jar-file's root. When I run the jar-file I get a java.lang.NoClassDefFoundError: org/hibernate/Session error. If I make use of the built-in export to jar in Eclipse, it works only if I choose "extract required libraries into jar". But that bloats the jar, and includes too much of my project (i.e. unit tests). Below is my generated manifest: Manifest-Version: 1.0 Main-Class: main.ServerImpl Class-Path: ./ antlr-2.7.6.jar commons-collections-3.1.jar dom4j-1.6.1.jar hibernate3.jar javassist-3.9.0.GA.jar jta-1.1.jar slf4j-api-1.5.11.jar slf4j-simple-1.5.11.jar mysql-connector-java-5.1.12-bin.jar rmiio-2.0.2.jar commons-logging-1.1.1.jar And the part of the build.xml looks like this: <target name="dist" depends="compile" description="Generates the Distribution Jar(s)"> <mkdir dir="${dist.dir}" /> <jar destfile="${dist.dir}/${dist.file.name}.jar" basedir="${build.prod.dir}" filesetmanifest="mergewithoutmain"> <manifest> <attribute name="Main-Class" value="${main.class}" /> <attribute name="Class-Path" value="./ ${manifest.classpath} " /> <attribute name="Implementation-Title" value="${app.name}" /> <attribute name="Implementation-Version" value="${app.version}" /> <attribute name="Implementation-Vendor" value="${app.vendor}" /> </manifest> <zipfileset refid="hibernatefiles" /> <zipfileset refid="slf4jfiles" /> <zipfileset refid="mysqlfiles" /> <zipfileset refid="commonsloggingfiles" /> <zipfileset refid="rmiiofiles" /> </jar> </target> The refids' for the zipfilesets point to the directories in a library directory lib in the root of the project. The manifest.classpath-variable takes the classpath of all those library jar-files, and flattens them with pathconvert and mapper. I've also tried to set the manifest classpath to ".", "./" and only the library jar, but to no difference at all. I'm hoping there's a simple remedy to my problems...

    Read the article

  • Import eclipse project as J2EE

    - by wuntee
    I have created a J2EE project using maven and would like to import it as a J2EE project (ie: auto have the libs jars added to the classpath, tomcat jars to classpath, etc). How can I change an existing project to a J2EE project?

    Read the article

  • Using properties in web.xml

    - by Pich
    Hi, I would like to control the settings in web.xml and using different once for different environments. Is it possible to use a property, from a property file on classpath, in web.xml? Something like this: <context-param> <param-name>myparam</param-name> <param-value>classpath:mypropertyfile.properties['myproperty']</param-value> </context-param> Best regards P

    Read the article

  • Problems running local copy of etherpad

    - by alpgs
    I get the following message when trying to execute etherpad/bin/run-local.sh: Exception in thread "main" java.lang.NoClassDefFoundError: net/appjet/oui/main I created CLASSPATH variable, export CLASSPATH="/home/user/src/etherpad/trunk/infrastructure/build" but that didn't help either. Although I can clearly see net/appjet/oui package in the build directory.

    Read the article

  • How can I make properties files mandatory in Spring?

    - by Paulo Guedes
    I have an ApplicationContext.xml file with the following node: <context:property-placeholder location="classpath:hibernate.properties, classpath:pathConfiguration.properties" /> It specifies that both properties files will be used by my application. But if one of these files does not exist, no error ir thrown. How can I throw an exception for any of these files? They should me mandatory.

    Read the article

  • How can I make properties in properties files mandatory in Spring?

    - by Paulo Guedes
    I have an ApplicationContext.xml file with the following node: <context:property-placeholder location="classpath:hibernate.properties, classpath:pathConfiguration.properties" /> It specifies that both properties files will be used by my application. Inside pathConfiguration.properties, some paths are defined, such as: PATH_ERROR=/xxx/yyy/error PATH_SUCCESS=/xxx/yyy/success A PathConfiguration bean has setters for each path. The problem is: when some of those mandatory paths are not defined, no error is thrown. How and where should I handle this problem?

    Read the article

  • Quick Quips on QR Codes

    - by Tim Dexter
    Yes, I'm an alliterating all-star; I missed my calling as a newspaper headline writer. I have recently received questions from several folks on support for QR codes. You know them they are everywhere you look, even here! How does Publisher handle QR codes then? In theory, exactly the same way we handle any other 2D barcode font. We need the font file, a mapping entry and an encoding class. With those three pieces we can embed QR codes into any output. To test the theory, I went off to IDAutomation, I have worked with them and many customers over the years and their fonts and encoders have worked great and have been very reliable. They kindly provide demo fonts which has made my life so much easier to be able to write posts like this. Their QR font and encoder is a little tough to find. I started here and then hit the Demo Now button. On the next page I hit the right hand Demo Now button. In the resulting zip file you'll need two files: AdditionalFonts.zip >> Automation2DFonts >> TrueType >> IDAutomation2D.ttf Java Class Encoder >> IDAutomation_JavaFontEncoder_QRCode.jar - the QRBarcodeExample.java is useful to see how to call the encoder. The font file needs to be installed into the windows/fonts directory, just copy and paste it in using file explorer and windows will install it for you. Remember, we are using the demo font here and you'll see if you get your phones decoder to looks a the font above there is a fixed string 'DEMO' at the beginning. You want that removed? Go buy the font from the IDAutomation folks. The Encoder Next you need to create your encoding wrapper class. Publisher does ship a class but its compiled and I do not recommend trying to modify it, you can just build your own. I have loaded up my class here. You do not need to be a java guru, its pretty straightforward. I'd recommend a java IDE like JDeveloper from a convenience point of view. I have annotated my class and added a main method to it so you can test your encoders from JDeveloper without having to deploy them first. You can load up the project form the zip file straight into JDeveloper.Next, take a look at IDAutomation's example java class and you'll see: QRCodeEncoder qre=new QRCodeEncoder();  String DataToEncode = "IDAutmation Inc.";  boolean ApplyTilde = false;  int EncodingMode = 0;  int Version = 0;  int ErrorCorrectionLevel = 0;  System.out.println( qre.FontEncode(DataToEncode, ApplyTilde, EncodingMode, Version, ErrorCorrectionLevel) ); You'll need to check what settings you need to set for the ApplyTilde, EncodingMode, Version and ErrorCorrectionLevel. They are covered in the user guide from IDAutomation here. If you do not want to hard code the values in the encoder then you can quite easily externalize them and read the values from a text file. I have not covered that scenario here, I'm going with IDAutomation's defaults and my phone app is reading the fonts no problem. Now you know how to call the encoder, you need to incorporate it into your encoder wrapper class. From my sample class:       Class[] clazz = new Class[] { "".getClass() };        ENCODERS.put("code128a",mUtility.getClass().getMethod("code128a", clazz));       ENCODERS.put("code128b",mUtility.getClass().getMethod("code128b", clazz));       ENCODERS.put("code128c",mUtility.getClass().getMethod("code128c", clazz));       ENCODERS.put("qrcode",mUtility.getClass().getMethod("qrcode", clazz)); I just added a new entry to register the encoder method 'qrcode' (in red). Then I created a new method inside the class to call the IDAutomation encoder. /** Call to IDAutomations QR Code encoder. Passing the data to encode      Returning the encoded string to the template for formatting **/ public static final String qrcode (String DataToEncode) {   QRCodeEncoder qre=new QRCodeEncoder();    boolean ApplyTilde = false;    int EncodingMode = 0;    int Version = 0;    int ErrorCorrectionLevel = 0; return qre.FontEncode(DataToEncode, ApplyTilde, EncodingMode, Version, ErrorCorrectionLevel); } Almost the exact same code in their sample class. The DataToEncode string is passed in rather than hardcoded of course. With the class done you can now compile it, but you need to ensure that the IDAutomation_JavaFontEncoder_QRCode.jar is in the classpath. In JDeveloper, open the project properties >> Libraries and Classpaths and then add the jar to the list. You'll need the publisher jars too. You can find those in the jlib directory in your Template Builder for Word directory.Note! In my class, I have used package oracle.psbi.barcode; As my package spec, yours will be different but you need to note it for later. Once you have it compiling without errors you will need to generate a jar file to keep it in. In JDeveloper highlight your project node >> New >> Deployment Profile >> JAR file. Once you have created the descriptor, just take the defaults. It will tell you where the jar is located. Go get it and then its time to copy it and the IDAutomation jar into the Template Builder for Word directory structure. Deploying the jars On your windows machine locate the jlib directory under the Template Builder for Word install directory. On my machine its here, F:\Program Files\Oracle\BI Publisher\BI Publisher Desktop\Template Builder for Word\jlib. Copy both of the jar files into the directory. The next step is to get the jars into the classpath for the Word plugin so that Publisher can find your wrapper class and it can then find the IDAutomation encoder. The most consistent way I have found so far, is to open up the RTF2PDF.jar in the same directory and make some mods. First make a backup of the jar file then open it using winzip or 7zip or similar and get into the META-INF directory. In there is a file, MANIFEST.MF. This contains the classpath for the plugin, open it in an editor and add the jars to the end of the classpath list. In mine I have: Manifest-Version: 1.0 Class-Path: ./activation.jar ./mail.jar ./xdochartstyles.jar ./bicmn.jar ./jewt4.jar ./share.jar ./bipres.jar ./xdoparser.jar ./xdocore.jar ./xmlparserv2.jar ./xmlparserv2-904.jar  ./i18nAPI_v3.jar ./versioninfo.jar ./barcodejar.jar ./IDAutomation_JavaFontEncoder_QRCode.jar Main-Class: RTF2PDF I have put in carriage returns above to make the Class-Path: entry more readable, make sure yours is all on one line. Be sure to use the ./ as a prefix to the jar name. Ensure the file is saved inside the jar file 7zip and winzip both have popups asking if you want to update the file in the jar file.Now you have the jars on the classpath, the Publisher plugin will be able to find our classes at run time. Referencing the Font The next step is to reference the font location so that the rendering engine can find it and embed a subset into the PDF output. Remember the other output formats rely on the font being present on the machine that is opening the document. The PDF is the only truly portable format. Inside the config directory under the Template Builder for Word install directory, mine is here, F:\Program Files\Oracle\BI Publisher\BI Publisher Desktop\Template Builder for Word\config. You'll find the file, 'xdo example.cfg'. Rename it to xdo.cfg and open it in a text editor. In the fonts section, create a new entry:       <font family="IDAutomation2D" style="normal" weight="normal">              <truetype path="C:\windows\fonts\IDAutomation2D.ttf" />       </font> Note, 'IDAutomation2D' (in red) is the same name as you can see when you open MSWord and look for the QRCode font. This must match exactly. When Publisher looks at the fonts in the RTF template at runtime it will see 'IDAutomation2D' it will then look at its font mapping entries to find where that font file resides on the disk. If the names do not match or the font is not present then the font will not get used and it will fall back on Helvetica. Building the Template Now you have the data encoder and the font in place and mapped; you can use it in the template. The two commands you will need to have present are: <?register-barcode-vendor:'ENCODER WRAPPER CLASS'; 'ENCODER NAME'?> for my encoder I have: <?register-barcode-vendor:'oracle.psbi.barcode.BarcodeUtil'; 'MyBarcodeEncoder'?> Notice the two parameters for the command. The first provides the package 'path' and class name (remember I said you need to remember that above.)The second is the name of the encoder, in my case 'MyBarcodeEncoder'. Check my full encoder class in the zip linked below to see where I named it. You can change it to something else, no problem.This command needs to be near the top of the template. The second command is the encoding command: <?format-barcode:DATAT_TO_ENCODE;'ENCODER_METHOD_NAME';'ENCODER_NAME'?> for my command I have <?format-barcode:DATATEXT;'qrcode';'MyBarcodeEncoder'?>DATATEXT is the XML element that contains the text to be encoded. If you want to hard code a piece of text just surround it with single quotes. qrcode is the name of my encoder method that calls the IDAutomation encoder. Remember this.MyBarcodeEncoder is the name of my encoder. Repetition? Yes but its needed again. Both of these commands are put inside their own form fields. Do not apply the QRCode font to the second field just yet. Lets make sure the encoder is working. Run you template with some data and you should get something like this for your encoded data: AHEEEHAPPJOPMOFADIPFJKDCLPAHEEEHA BNFFFNBPJGMDIDJPFOJGIGBLMPBNFFFNB APIBOHFJCFBNKHGGBMPFJFJLJBKGOMNII OANKPJFFLEPLDNPCLMNGNIJIHFDNLJFEH FPLFLHFHFILKFBLOIGMDFCFLGJGOPJJME CPIACDFJPBGDODOJCHALJOBPECKMOEDDF MFFNFNEPKKKCHAIHCHPCFFLDAHFHAGLMK APBBBPAPLDKNKJKKGIPDLKGMGHDDEPHLN HHHHHHHPHPHHPHPPHPPPPHHPHHPHPHPHP Grooovy huh? If you do not get the encoded text then go back and check that your jars are in the right spot and that you have the MANIFEST.MF file updated correctly. Once you do get the encoded text, highlight the field and apply the IDAutomation2D font to it. Then re-run the report and you will hopefully see the QR code in your output. If not, go back and check the xdo.cfg entry and make sure its in the right place and the font location is correct. That's it, you now have QR codes in Publisher outputs. Everything I have written above, has been tested with the 5.6.3, 10.1.3.4.2 codelines. I'll be testing the 11g code in the next day or two and will update you with any changes. One thing I have not covered yet and will do in the next few days is how to deploy all of this to your server. Look out for a follow up post. One note on the apparent white lines in the font (see the image above). Once printed they disappear and even viewing the code on a screen with the white lines, my phone app is still able to read and interpret the contents no problem. I have zipped up my encoder wrapper class as a JDeveloper 11.1.1.6 project here. Just dig into the src directories to find the BarcodeUtil.java file if you just want the code. I have put comments into the file to hopefully help the novice java programmer out. Happy QR'ing!

    Read the article

  • How do I add the j2ee.jar to a Java2WSDL ant script programmatically?

    - by Marcus
    I am using IBM's Rational Application Developer. I have an ant script that contains the Java2WSDL task. When I run it via IBM, it gives compiler errors unless I include the j2ee.jar file in the classpath via the run tool (it does not pick up the jar files in the classpath in the script). However, I need to be able to call this script programmatically, and it is giving me this error: "java.lang.NoClassDefFoundError: org.eclipse.core.runtime.CoreException" I'm not sure which jars need to be added or where? Since a simple echo script runs, I assume that it is the j2ee.jar or another ant jar that needs to be added. I've added it to the project's buildpath, but that doesn't help. (I also have ant.jar, wsanttasks.jar, all the ant jars from the plugin, tools.jar, remoteAnt.jar, and the swt - all which are included in the buildpath when you run the script by itself.) Script: <?xml version="1.0" encoding="UTF-8"?> <project default="build" basedir="."> <path id="lib.path"> <fileset dir="C:\Program Files\IBM\WebSphere\AppServer\lib" includes="*.jar"/> <!-- Adding these does not help. <fileset dir="C:\Program Files\IBM\SDP70Shared\plugins\org.apache.ant_1.6.5\lib" includes="*.jar"/> <fileset dir="C:\Program Files\IBM\SDP70\jdk\lib" includes="*.jar"/> <fileset dir="C:\Program Files\IBM\SDP70\configuration\org.eclipse.osgi\bundles\1139\1\.cp\lib" includes="*.jar"/> <fileset dir="C:\Program Files\IBM\SDP70Shared\plugins" includes="*.jar"/> --> </path> <taskdef name="java2wsdl" classname="com.ibm.websphere.ant.tasks.Java2WSDL"> <classpath refid="lib.path"/> </taskdef> <target name="build"> <echo message="Beginning build"/> <javac srcdir="C:\J2W_Test\Java2Wsdl_Example" destdir="C:\J2W_Test\Java2Wsdl_Example"> <classpath refid="lib.path"/> <include name="WSExample.java"/> </javac> <echo message="Set up javac"/> <echo message="Running java2wsdl"/> <java2wsdl output="C:\J2W_Test\Java2Wsdl_Example\example\META-INF\wsdl\WSExample.wsdl" classpath="C:\J2W_Test\Java2Wsdl_Example" className= "example.WSExample" namespace="http://example" namespaceImpl="http://example" location="http://localhost:9080/example/services/WSExample" style="document" use="literal"> <mapping namespace="http://example" package="example"/> </java2wsdl> <echo message="Complete"/> </target> </project> Code: File buildFile = new File("build.xml"); Project p = new Project(); p.setUserProperty("ant.file", buildFile.getAbsolutePath()); DefaultLogger consoleLogger = new DefaultLogger(); consoleLogger.setErrorPrintStream(System.err); consoleLogger.setOutputPrintStream(System.out); consoleLogger.setMessageOutputLevel(Project.MSG_INFO); p.addBuildListener(consoleLogger); try { p.fireBuildStarted(); p.init(); ProjectHelper helper = ProjectHelper.getProjectHelper(); p.addReference("ant.projectHelper", helper); helper.parse(p, buildFile); p.executeTarget(p.getDefaultTarget()); p.fireBuildFinished(null); } catch (BuildException e) { p.fireBuildFinished(e); } Error: [java2wsdl] java.lang.NoClassDefFoundError: org.eclipse.core.runtime.CoreException [java2wsdl] at java.lang.J9VMInternals.verifyImpl(Native Method) [java2wsdl] at java.lang.J9VMInternals.verify(J9VMInternals.java:68) [java2wsdl] at java.lang.J9VMInternals.initialize(J9VMInternals.java:129) [java2wsdl] at com.ibm.ws.webservices.multiprotocol.discovery.ServiceProviderManager.getDiscoveredServiceProviders(ServiceProviderManager.java:378) [java2wsdl] at com.ibm.ws.webservices.multiprotocol.discovery.ServiceProviderManager.getAllServiceProviders(ServiceProviderManager.java:214) [java2wsdl] at com.ibm.ws.webservices.wsdl.fromJava.Emitter.initPluggableBindings(Emitter.java:2704) [java2wsdl] at com.ibm.ws.webservices.wsdl.fromJava.Emitter.<init>(Emitter.java:389) [java2wsdl] at com.ibm.ws.webservices.tools.ant.Java2WSDL.execute(Java2WSDL.java:122) [java2wsdl] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [java2wsdl] at org.apache.tools.ant.Task.perform(Task.java:364) [java2wsdl] at org.apache.tools.ant.Target.execute(Target.java:341) [java2wsdl] at org.apache.tools.ant.Target.performTasks(Target.java:369) [java2wsdl] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [java2wsdl] at org.apache.tools.ant.Project.executeTarget(Project.java:1185) [java2wsdl] at att.ant.RunAnt.main(RunAnt.java:32)

    Read the article

  • Programming Java 7 in Eclipse

    - by reprogrammer
    I installed JDK 7 and Eclipse 3.6M6. Then, I added JRE 7 as a new JRE execution environment in Eclipse, and set the compiler compliance level to Java 7. I can compile the following piece of code through command line using the javac that comes with JDK 7. import java.util.HashMap; import java.util.Map; public class Try { public static void main(String[] args) { Map<Integer, String> map = new HashMap<>(); } } But, Eclipse gives the following error messages. Incorrect number of arguments for type HashMap; it cannot be parameterized with arguments Try.java /TryJava7/src line 7 Java Problem Syntax error on token "<", ? expected after this token Try.java /TryJava7/src line 7 Java Problem Even though I've set the compliance level of the compiler to Java 7, it looks like Eclipse doesn't understand Java7 syntax yet. Is it possible to play with Java 7 in Eclipse? The following is the content of .classpath. <?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry kind="src" path="src"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/> <classpathentry kind="output" path="bin"/> </classpath> And, the following is the content of .settings/org.eclipse.jdt.core.prefs. eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve org.eclipse.jdt.core.compiler.compliance=1.7 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.source=1.7

    Read the article

  • cxf jaxws with spring on gwt 2.0

    - by Karl
    Hi, I'm trying to use an application which uses cxf-jaxws in bean definition: <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sec="http://cxf.apache.org/configuration/security" xmlns:jaxws="http://cxf.apache.org/jaxws" xmlns:util="http://www.springframework.org/schema/util" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd"> however in combination with the jetty from gwt 2.0 development shell my context doesn't load and I get this exception: org.springframework.web.context.ContextLoader: Context initialization failed org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://cxf.apache.org/jaxws] enter code hereOffending resource: class path resource [bean_definition.xml] My project is maven-based and I got cxf-rt-frontend-jaxws which contains the namespacehandler and spring.handlers on the classpath. I added cxf-transports-http-jetty.jar as well. Has anyone experienced this kind of problem and found a solution? It seems to be a classpath issue, added the cxf-rt-frontend-jaxws.jar by hand and it works... Somehow the maven dependency doesn't get added to the classpath. Thanks in advance, karl

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >