• 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
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

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

 
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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,
 
Bartender
Posts: 6663
5
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Jeevan Reddy
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
If you are using a wood chipper, you are doing it wrong. Even on this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic