2 Replies Latest reply on Mar 22, 2005 11:11 AM by 843830

    java.lang.LinkageError: Class org/jdom/Document violates loader constraints

    843830
      Hi.

      I use Sun ONE app server 7. I kepp getting this error message when SessionBean returns org.jdom.Document object. I call this method from servlet:

      org.jdom.Document doc = remote.createJDOM();

      I have xerces.jar and jdom.jar in my classpath among others.

      When I try(in servlet) for example print out document root element:

      doc.getRootElement().toString();

      error is thrown:

      javax.servlet.ServletException: Servlet execution threw an exception
           at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:742)
           at org.apache.catalina.core.StandardWrapperValve.access$000(StandardWrapperValve.java:118)
           at org.apache.catalina.core.StandardWrapperValve$1.run(StandardWrapperValve.java:278)
           at java.security.AccessController.doPrivileged(Native Method)
           at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:274)
           at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
           at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
           at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
           at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
           at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:157)
           at com.iplanet.ias.web.WebContainer.service(WebContainer.java:598)



      Root Cause
      java.lang.LinkageError: Class org/jdom/Document violates loader constraints
           at java.lang.ClassLoader.defineClass0(Native Method)
           at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
           at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
           at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1690)
           at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:974)
           at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1413)
           at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1291)
           at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)

      Is there some confilct with the jar files or something like that?