aspose file tools*
The moose likes BEA/Weblogic and the fly likes EAR precompilation - java.lang.NoClassDefFoundError: weblogic/utils/compiler/Tool Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "EAR precompilation - java.lang.NoClassDefFoundError: weblogic/utils/compiler/Tool" Watch "EAR precompilation - java.lang.NoClassDefFoundError: weblogic/utils/compiler/Tool" New topic
Author

EAR precompilation - java.lang.NoClassDefFoundError: weblogic/utils/compiler/Tool

Jeevan Reddy
Ranch Hand

Joined: Nov 10, 2009
Posts: 142
Hi all,

I trying to precompile an ear built for Weblogic application server.
Weblogic.jar is in the classpath. It is giving java.lang.NoClassDefFoundError: weblogic/utils/compiler/Tool error. Unable to find out which jar has the above class file.
Please check if you have any idea on the error.
I searched all jars in the Weblogic installation directory. But could not find the class file.

Complete error
precompile-weblogic:
[java] Exception in thread "main" java.lang.NoClassDefFoundError: weblogic/utils/compiler/Tool
[java] at java.lang.ClassLoader.defineClass1(Native Method)
[java] at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
[java] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
[java] at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
[java] at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
[java] at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
[java] at java.security.AccessController.doPrivileged(Native Method)
[java] at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
[java] at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
[java] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
[java] at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
[java] at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
[java] at weblogic.appc.main(appc.java:14)
[java] Caused by: java.lang.ClassNotFoundException: weblogic.utils.compiler.Tool
[java] at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
[java] at java.security.AccessController.doPrivileged(Native Method)
[java] at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
[java] at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
[java] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
[java] at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
[java] at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
[java] ... 13 more

Thanks in advance,

SCJP 1.6 (94%)
http://faq.javaranch.com/java/JspFaq
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6662
    
    5

Why dont you let the precompilation process to the server ? If I understand correctly, you are trying to precompile the JSPs and attach them to the EAR ? Weblogic is capable of doing this at deployment time. Any reason why you want to do this at runtime ?

The missing jar might be inside the modules folder of BEA_HOME


SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
Jeevan Reddy
Ranch Hand

Joined: Nov 10, 2009
Posts: 142
Yes, I should precompile JSPs in the EAR and attach them to the EAR.
I am running into issues because I am not letting the server to do pre-compilation. If do that precompilation goes without any errors.

Due to some reasons, I can not let the server do the precompilation. I have to get all Weblogic jars in the classpath and do it.

I am not able figure out which jar has the class file weblogic/utils/compiler/Tool. Searched on net too, could not find.

I wrote a shell script to search all the Jars in BEA_HOME for a class file, but that also gave no result. May be, the bloody script is wrong . But I have tested for other class files, it works. So I guess nothing wrong with it. In the end, could not figure out and posted here for some help.vv
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: EAR precompilation - java.lang.NoClassDefFoundError: weblogic/utils/compiler/Tool