JVM throws NoClassDefFoundError when a static loading of class takes place and a class does not exist. Usually, this means that the class is present at the compile time and class loader isn't able to locate class at runtime. However, NoClassDefFoundError is mostly caused by dynamic loading of classes during runtime using reflection. Class.forName, ClassLoader.findSystemClass, ClassLoader.loadClass.
A detailed account of how to handle NoClassDefFoundError can be found here.. http://javarevisited.blogspot.com.au/2011/06/noclassdeffounderror-exception-in.html
Chief things to remember from the above blogpost -
a. Check for Class Path
b. Check for missing JAR
c. Check for JAR permissions
d. Since NoClassDefFoundError is sub-class of LinkageError, could be a linkage issue.
e. Check for Static load Initialization failure
f. Multiple Class loaders in J2EE environment
g. Check for typo in Bean initialization xml files
A detailed account of how to handle NoClassDefFoundError can be found here.. http://javarevisited.blogspot.com.au/2011/06/noclassdeffounderror-exception-in.html
Chief things to remember from the above blogpost -
a. Check for Class Path
b. Check for missing JAR
c. Check for JAR permissions
d. Since NoClassDefFoundError is sub-class of LinkageError, could be a linkage issue.
e. Check for Static load Initialization failure
f. Multiple Class loaders in J2EE environment
g. Check for typo in Bean initialization xml files
No comments:
Post a Comment