File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JBoss/WildFly and the fly likes NoClassDefFoundError Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "NoClassDefFoundError" Watch "NoClassDefFoundError" New topic


Kelly Dolan
Ranch Hand

Joined: Jan 08, 2002
Posts: 109
I have an EAR file that contains both an application WAR and JAR file. The EAR file has a lib folder that contains a number of 3rd party JARs needed by the application WAR and JAR. The MANIFEST.MF file in both the WAR and JAR file does not specify a Class-Path.

Our app is now dependent on some new 3rd party JARs. If we add them to the jboss\server\default\lib, the JAR is able to load a class in these JARs (we do this to confirm if certain functionality is available). If we put them in the EAR\lib folder, we get a NoClassDefFoundError.

So I'm stumped. Why can we find the EAR\lib JARS that are currently there but not the new ones we put in there? Could this be a classloader problem?

Ultimately, if no one has a great answer for this, I'm just looking for some way to get JBoss to log when we try to load a class, where is it looking? I found a wiki page on the JBoss site re: TRACE to ucl.log. This contains some information such as it's indexing the EAR\lib folder. But it doesn't tell me it found the 3rd party JARs or when we ask to load the class where it's actually looking, etc.

Any help is appreciated. Thanks!

BTW - I'm running JBoss 4.0.4GA
I agree. Here's the link:
subject: NoClassDefFoundError
It's not a secret anymore!