• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

problem in deploying my stateless session bean application

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hai friends


Iam tring to deploy a stateless session bean application using weblogic builder in which iam facing a error saying as below.
Validating module classes.jar
Compiling input jar D:\vineelApplications\firstslsb\WEB-INF\classes.jar
Processing input descriptor

Checking J2EE compliance of beans
Beans are J2EE compliant

Generated bean sources for mybean

Compiling EJB sources
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:198)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(URLClassLoader.java:186)

at java.lang.ClassLoader.loadClass(ClassLoader.java:299)

at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:272)

at java.lang.ClassLoader.loadClass(ClassLoader.java:255)

at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Class.java:140)

at weblogic.utils.compiler.CompilerInvoker.compileMaybeExit(CompilerInvoker.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:517)

at weblogic.utils.compiler.Tool.run(Tool.java:146)

at weblogic.utils.compiler.Tool.run(Tool.java:103)

at weblogic.marathon.tasks.EJBCTask.runBackground(EJBCTask.java:140)

at weblogic.tools.jellybeans.core.task.TaskThread.execute(TaskThread.java:127)

at weblogic.tools.jellybeans.core.task.TaskThread.run(TaskThread.java:64)


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



COULD YOU PLEASE HELP ME HOW TO SOLVE THE ERROR PLEASE
 
Ranch Hand
Posts: 153
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Vineel,

Please make sure you have tools.jar in your classpath.
 
vineel kumar
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi you mean classpath of the jdk tool.jar.if so i had tried that also seeting in the classpath of environmental variables it says the same error.
 
Shailesh Kini
Ranch Hand
Posts: 153
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Vineel,

You have to look at the startup parameters of your app server. Your app server is looking for a JDK but probably is just using your public jre to run. The error is caused when your app server is trying to compile some files it generates during deployment. It is complaining because it does not find "com.sun.tools.javac.Main" class which is required for on the fly compilation and you should find it under tools.jar. You might just want to put tools.jar into the lib folder of your appserver. I believe that should hopefully resolve this issue.
[ August 17, 2007: Message edited by: Shailesh Kini ]
 
vineel kumar
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi
you had said to keep tools.jar file in to the lib folder of Application server.But i could not understand where it should be placed.please tell me correct destination where the tools.jar has to be placed.like from where i have to copy tools.jar and where i have to paste it.please tell me in detail.lam using weblogic8.1 server. As i had never done any installation, i don't know all these to do.Even it is a simple one i could not understand.please help me in this
 
Ranch Hand
Posts: 380
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why dont you check your classpath variable from your code and check if tools.jar is in the classpath or not..

Put this in the method in your bean and see the output on the console

Map env = System.getenv();
for (Iterator it=env.entrySet().iterator(); it.hasNext(); ) {
Map.Entry entry = (Map.Entry)it.next();
System.out.println(entry.getKey() + " = " + entry.getValue());

Regards,
Shivani
 
reply
    Bookmark Topic Watch Topic
  • New Topic