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

Weblogic.ejbc error

22 views
Skip to first unread message

Dhirender Kumar Thakur

unread,
Sep 13, 2004, 4:19:57 AM9/13/04
to
Hi All,

I am learning EJB and trying to deploy a stateless session bean. I have compiled all the java files and created test.jar(contains .class files and META-INF/.xml files) file.

When I am executing the command java weblogic.ejbc test.jar final.jar, following errors are shown:

<Warning> <EJB> <BEA-010054> <EJB Deployment: stat
elessSession has a class TraderBean that is in the classpath. This class should
only be located in the ejb-jar file.>
<Warning> <EJB> <BEA-010054> <EJB Deployment: stat
elessSession has a class TraderHome that is in the classpath. This class should
only be located in the ejb-jar file.>
<Warning> <EJB> <BEA-010054> <EJB Deployment: stat
elessSession has a class Trader that is in the classpath. This class should only
be located in the ejb-jar file.>
<Warning> <EJB> <BEA-010202> <Call-by-reference is
not enabled for the EJB 'statelessSession'. The server will have better perform
ance if it is enabled. To enable call-by-reference, set the enable-call-by-refer
ence element to True in the weblogic-ejb-jar.xml deployment descriptor for this
EJB.>
Compiler class: 'com.sun.tools.javac.Main', not found
java.lang.ClassNotFoundException: com.sun.tools.javac.Main
at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:141)
at weblogic.utils.compiler.CompilerInvoker.compileMaybeExit(CompilerInvo
ker.java:407)
at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:
329)
at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:
337)
at weblogic.ejb20.ejbc.EJBCompiler.doCompile(EJBCompiler.java:270)
at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:476)
at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:397)
at weblogic.ejbc20.runBody(ejbc20.java:519)
at weblogic.utils.compiler.Tool.run(Tool.java:146)
at weblogic.utils.compiler.Tool.run(Tool.java:103)
at weblogic.ejbc.main(ejbc.java:29)

ERROR: Error from ejbc: Compiler class: 'com.sun.tools.javac.Main', not found


ERROR: ejbc couldn't invoke compiler

How can I rectify these errors. Please guide me. I have included the weblogic.jar file in classpath.

Thanks in advance.

Dharminder Singh

unread,
Sep 21, 2004, 3:57:01 AM9/21/04
to
To get rid of the warnings you need to remove the ejb classes from the server classpath.

To fix the classdefnotfound problem you should probably add tools.jar from the jdk to the classpath.

Hope this works.

ds

Philip Glebow

unread,
Jan 15, 2005, 11:31:49 AM1/15/05
to
I had this same problem when building my EJBs using Ant. I added "-compiler javac" to the weblogic task and it fixed the problem:

<weblogic destdir="${JAR.DIR}" args="-nowarn -compiler javac" ejbcclass="weblogic.ejbc">
<wlclasspath>
<path refid="ejbc.classpath"/>
</wlclasspath>
</weblogic>

Phil

0 new messages