Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unable to run ejbc from within eclipse

 
Premil Jacob
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have eclipse version Version: 3.0.1 , but every time I try to run the following weblogic ant task

<target name="deploy" depends="startup">
<ejbjar descriptordir="${config}" srcdir="${dest}" naming="ejb-name">
<weblogic destdir="${deploy}" ejbcclass="weblogic.ejbc" />
<exclude name="weblogic*.xml"/>
</ejbjar>
</target>

I get the following error message.

[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:199)
[ejbc] at java.security.AccessController.doPrivileged(Native Method)
[ejbc] at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
[ejbc] at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
[ejbc] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
[ejbc] at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
[ejbc] at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
[ejbc] at java.lang.Class.forName0(Native Method)
[ejbc] at java.lang.Class.forName(Class.java:141)
[ejbc] at weblogic.utils.compiler.CompilerInvoker.compileMaybeExit(CompilerInvoker.java:406)
[ejbc] at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:328)
[ejbc] at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:336)
[ejbc] at weblogic.ejb20.ejbc.EJBCompiler.doCompile(EJBCompiler.java:270)
[ejbc] at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:476)
[ejbc] at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:397)
[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] ERROR: Error from ejbc: Compiler class: 'com.sun.tools.javac.Main', not found
[ejbc] ERROR: ejbc couldn't invoke compiler


When I try to run the same ant task from the command prompt, it seems to be working fine.
 
Carol Enderlin
drifter
Ranch Hand
Posts: 1364
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Premil Jacob:
I have eclipse version Version: 3.0.1 , but every time I try to run the following weblogic ant task

<target name="deploy" depends="startup">
<ejbjar descriptordir="${config}" srcdir="${dest}" naming="ejb-name">
<weblogic destdir="${deploy}" ejbcclass="weblogic.ejbc" />
<exclude name="weblogic*.xml"/>
</ejbjar>
</target>


When I try to run the same ant task from the command prompt, it seems to be working fine.


Try adding compiler="javac". Here's what that one line looks like in our build file:
<weblogic destdir="${compiledEJBs}" suffix="EJB.jar" ejbcclass="weblogic.ejbc" compiler="javac" >

I only run it on the command line, but I get the error (Compiler class: 'com.sun.tools.javac.Main', not found) if I take out compiler="javac".
 
Premil Jacob
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Great !!! its working now, thanks Carol.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic