Application Server Solutions for Microsoft IIS and ASP.NET
       solutions   products   partners   company   support   downloads         store
BlueDragon Self-Help: FAQ
Back to Search >  Back to Search Results

Faq ID 90
Product ServletExec
Category Debugging, Miscellaneous
Question I am getting java.lang.NoClassDefFoundError. What does this mean?
Answer NoClassDefFoundError is not the same thing as ClassNotFoundException. A ClassNotFoundException means that the class could not be found by the classloader, usually due to the class not being on the Classpath. NoClassDefFoundError indicates that the class was found but that something went wrong when the class was loaded into the JVM. One example of a situation that can result in a NoClassDefFoundError would be a class that uses static intializers (a static class variable, or a static block) which throws an exception. Even if the exception is caught, this Error can be thrown at runtime. The problem may not be seen until the first attempt is made to create an object instance from the class definition. It is at this time (runtime) when the JVM realizes that no class definition exists and throws the error.

Another example of when you might see a NoClassDefFoundError might be if the user under which ServletExec is running, does not have the proper file permissions to both read-in, and execute a given class file. A problem like this is less common, but when it does occur, it is usually with SE ISAPI (IIS webserver on Windows). For more details about how to diagnose a file permission issue like that, you should view FAQ #60 at this site:
http://www.newatlanta.com/do/findFaq?faq_id=60
The problem description given in that FAQ is different from the one in this FAQ, but their solutions may very likely be the same. We can also say that if this problem occurs when ServletExec is trying to startup, the JVM may not be able to actually startup SE. In such a case, the error message seen in DBMON may be something like:
ServletExec: setup() failed to find main java class.
FindClass exception: java.lang.NoClassDefFoundError: com/newatlanta/servletexec/ServletExec

Even though the ServletExec JAR file is clearly shown in the Classpath.



   
company media information terms of use privacy policy contact us