Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ejbjar ant task

2 views
Skip to first unread message

Steve

unread,
Jun 16, 2004, 2:24:43 PM6/16/04
to

Is the ejbjar and task supported in weblogic 8.1 sp_2? I have listed the build
script below and the error ( NOTE, the jdk tools.jar is in my CLASSPATH ):

BUILD SCRIPT TARGET:

<TARGET NAME="jar_ejb" DEPENDS = "init">
<PROPERTY NAME="ejb.target" VALUE="*" />
<EJBJAR DESCRIPTORDIR="${deployment_descriptor_directory}"
SRCDIR="${classes}"
NAMING="${name_source}" >
<CLASSPATH>
<PATHELEMENT LOCATION = "${WL_HOME}/server/lib/weblogic_sp.jar"/>
<PATHELEMENT LOCATION = "${WL_HOME}/server/lib/weblogic.jar"/>
<PATHELEMENT LOCATION = "${JAVA_HOME}/lib/tools.jar"/>
<PATHELEMENT PATH = "${common_application_jars}"/>
<PATHELEMENT LOCATION = "${ejb_build_dir}/${jar_name}.jar"/>
<PATHELEMENT LOCATION = "${classes}"/>
</CLASSPATH>
<DTD PUBLICID="-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans
1.1//EN"
LOCATION="./dtd/ejb11-jar.dtd"/>
<SUPPORT DIR="${classes}" INCLUDES="${ejbs}"/>
<WEBLOGIC DESTDIR="${staging_dir}/wars_jars" />
<INCLUDE NAME="**/*${ejb.target}*ejb-jar.xml"/>
<EXCLUDE NAME="**/*weblogic*.xml"/>
</EJBJAR>
</TARGET>


ERROR GENERATED:

[ejbc] Compiler class: 'com.sun.tools.javac.Main', not found
[ejbc] java.lang.ClassNotFoundException: com.sun.tools.javac.Main
[ejbc] at java.net.URLClassLoader$1.run(URLClassLoader.java:198)
[ejbc] at java.security.AccessController.doPrivileged(Native Method)
[ejbc] at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
[ejbc] at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
[ejbc] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:272)

[ejbc] at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
[ejbc] at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)

[ejbc] at java.lang.Class.forName0(Native Method)
[ejbc] at java.lang.Class.forName(Class.java:140)
[ejbc] at weblogic.utils.compiler.CompilerInvoker.compileMaybeExit(Comp
ilerInvoker.java:407)
[ejbc] at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvok
er.java:329)
[ejbc] at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvok
er.java:337)
[ejbc] at weblogic.ejb20.ejbc.EJBCompiler.doCompile(EJBCompiler.java:27
0)
[ejbc] at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:4
76)
[ejbc] at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:3
97)
[ejbc] at weblogic.ejbc20.runBody(ejbc20.java:517)
[ejbc] at weblogic.utils.compiler.Tool.run(Tool.java:146)
[ejbc] at weblogic.utils.compiler.Tool.run(Tool.java:103)
[ejbc] at weblogic.ejbc.main(ejbc.java:29)
[ejbc]
[ejbc] ERROR: Error from ejbc: Compiler class: 'com.sun.tools.javac.Main',
not found
[ejbc]
[ejbc]
[ejbc] ERROR: ejbc couldn't invoke compiler
[ejbc]

BUILD FAILED

C:\appsrv\build\build_ejb.xml:47: Exception while calling weblogic.ejbc. Details
: Ejbc reported an error


Seth White

unread,
Jun 17, 2004, 3:29:35 PM6/17/04
to
Hi.

I'm not aware of any changes in 8.1 that would cause the Java compiler not
to be found.

Seth

"Steve" <st...@nospam.com> wrote in message news:40d0906b$1@mktnews1...

Matthew Shinn

unread,
Jun 17, 2004, 8:45:13 PM6/17/04
to

Hey Steve,

I would first verify your classpath is indeed correctly pointing to your tools.jar
location. I'm not sure how to do it with the ejbc ant task but you can also specify
that ejbc exec the compiler (instead of calling the com.sun.tools.javac.Main class).
You would do this on the ejbc command line, by including the "-compiler javac"
option. Finally, you can also give the appc ant task (ships with 8.1) a try.
The weblogic.ejbc tool is actually deprecated in favor of weblogic.appc.

- Matt

0 new messages