[jboss-dev-forums] [Design of JBossXB] - Re: JBossXB should swap out the Context ClassLoader before i

pfrontiero do-not-reply at jboss.com
Wed Aug 19 10:15:08 EDT 2009


I actually had a couple of issues during startup which seem to be a result of the classloader changes in 5.1.0.GA:

1. Caused by: java.lang.LinkageError: loader constraint violation: when resolving method "javax.xml.parsers.DocumentBuilder.setEntityResolver(Lorg/xml/sax/EntityResolver;)V" the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) of the current class, org/springframework/beans/factory/xml/DefaultDocumentLoader, and the class loader (instance of ) for resolved class, javax/xml/parsers/DocumentBuilder, have different Class objects for the type org/xml/sax/EntityResolver used in the signature

Our web app is deployed is as follows:

default
          /lib
           saxon.jar
         /deploy
                    /app.ear
                                 /app.war

In order to resolve this issue (without disabling the WarClassLoaderDeployer) I had to copy saxon.jar to the WEB-INF/lib directory of app.war.  If I moved it, I received other ClassNotFoundExceptions during startup.  Not sure why this would be. 

2. Caused by: java.lang.ClassCastException: org.apache.xerces.jaxp.DocumentBuilderFactoryImpl cannot be cast to javax.xml.parsers.DocumentBuilderFactory

This is the error which lead me to this forum posting.  We do not have xercesImpl as part of our app, only saxon.jar, which I moved there in order to get past the first issue.
                                                           


View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4250411#4250411

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4250411



More information about the jboss-dev-forums mailing list