appc:
[java] Compiler class: 'com.sun.tools.javac.Main', not found
[java] java.lang.ClassNotFoundException: com.sun.tools.javac.Main
[java] at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
[java] at java.security.AccessController.doPrivileged(NativeMethod)
[java] at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
[java] at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
[java] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
[java] at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
[java] at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
[java] at java.lang.Class.forName0(Native Method)
[java] at java.lang.Class.forName(Class.java:141)
[java] at weblogic.utils.compiler.CompilerInvoker.compileMaybeExit(CompilerInvoker.java:407)
[java] at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:329)
[java] at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:337)
[java] at weblogic.ejb20.ejbc.EJBCompiler.doCompile(EJBCompiler.java:270)
[java] at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:476)
[java] at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:387)
[java] at weblogic.appc.compileEJB(appc.java:796)
[java] at weblogic.appc.compileEJB(appc.java:770)
[java] at weblogic.appc.compileInput(appc.java:462)
[java] at weblogic.appc.runBody(appc.java:183)
[java] at weblogic.utils.compiler.Tool.run(Tool.java:146)
[java] at weblogic.utils.compiler.Tool.run(Tool.java:103)
[java] at weblogic.appc.main(appc.java:1022)
[java] [J2EE:160121]Errors encountered while compiling module 'E:\oss.sandbox\components\server\OssSession\dist\OssSession.jar':
[java] Compiler class: 'com.sun.tools.javac.Main', not found
It appears that appc cannot find the Java compiler. Has anybody come across this
problem? We checked the Windows path a million times and it is correct. Other
java files are being compiled by ant without any problems. As soon as appc start
we get this error!
Any help would be much appreciated.
Thanks.
Naresh
-- Rob
<path id="compile.path">
<pathelement location="C:\j2sdk\lib\tools.jar"/>
<pathelement location="${weblogic.jar}"/>
</path>
<target name="appc">
<java classname="weblogic.appc" fork="yes" failonerror="yes"
classpathref="compile.path">
<arg value="${dist.dir}/${ejb-name}.jar"/>
</java>
</target>
Before we go about changing our build scripts, we would like to understand why
is WL 8.1.1 behaving differently. Please let us know if you have any ideas.
Thanks.
Naresh
I would recommend that you use the wlappc ant task rather than the raw
java task.
If you'd prefer to use the <java> task for some reason, then I'd
recommend fork="no" and adding -noexit to the appc args. This will
definitely help your build speed.
Thanks for the response. I would prefer to use the wlappc task, however I am having
some trouble with its syntax. I have read the manuals, but that did not help.
Can you please help?
My path is defined using the following ant syntax:
<path id="compile.path">
<pathelement location="${framework.jar}"/>
<pathelement location="${oss-common.jar}"/>
<pathelement location="${server-oss-common.jar}"/>
<pathelement location="${weblogic.jar}"/>
</path>
I am trying to use this classpath in the wlappc task. I have tried two approaches:
1)
<target name="appc">
<wlappc
source="${dist.dir}/${ejb-name}.jar"
classpathref="compile.path"/>
</target>
2)
<target name="appc">
<wlappc
source="${dist.dir}/${ejb-name}.jar">
<classpath>
<path refid="compile.path"/>
</classpath>
</wlappc>
</target>
Both approaches give the following error:
java.util.MissingResourceException: Can't find bundle for base name weblogic.i18n.J2EELogLocalizer,
locale en_US
Isn't there anyway to reference a classpath that is defined elswhere? I can't
define the classpath directly in the wlappc task because it is referenced in multiple
places and I like to keep only one copy of it.