Win a copy of Succeeding with AI this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Junilu Lacar
Sheriffs:
  • Tim Cooke
  • Jeanne Boyarsky
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • fred rosenberger
  • Frits Walraven

Unable to run ejbc from within eclipse

 
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.
 
drifter
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.
 
Look! It's Leonardo da Vinci! And he brought a tiny ad!
Two software engineers solve most of the world's problems in one K&R sized book
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic