Servlet failed to load caused by java.lang.LinkageErrors
 Technote (troubleshooting)
 
Problem(Abstract)
[8/3/06 8:07:15:902 MDT] 5cbe194b WebGroup E SRVE0020E: [ServletError]-[portal]: Failed to load servlet:
javax.servlet.UnavailableException:

Initialization of one or more services failed.

Caused by: java.lang.LinkageError: Class com/mycompany/util/MyUtilityClass violates loader constraints definition mismatch between parent and child loaders .
 
Cause
Two classloaders loading the same class where one classloader is a parent of the other.
For instance WebSphere bootstrap classloader loaded "MyUtilityClass" in /opt/mySQLjdbc/lib/myutil.jar (as seen in native_stderr.log when verbose classloader tracing is enabled) and classloader.ExtJarClassLoader loaded SinglePathClassProvider@73d37aad classpath = /opt/mySQLjdbc/lib/myutil.jar
(as seen in the trace.log.)

The JVM and WAS server bootstrap loader is the parent all other classloaders and therefore the LinkageError is thrown.
 
Resolving the problem
Remove "/opt/mySQLjdbc/lib/myutil.jar" from the classpath from either the WebSphere server or from the application.
In this case, we removed the myutil.jar from a shared library through the administrative console. >
Environment > Shared Libraries > [YourSharedLibName] > classpath
 
 
Cross Reference information
Segment Product Component Platform Version Edition
Application Servers Runtimes for Java Technology Java SDK
 
Historical Number
30298
033
000
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > Classloader
Operating system(s): Windows
Software version: 6.1
Software edition:
Reference #: 1245199
IBM Group: Software Group
Modified date: Sep 4, 2006