[Design of JBossXB] - Re: JBossXB should swap out the Context ClassLoader before i
by pfrontiero
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
16 years, 7 months
[Design of JBossXB] - Re: JBossXB should swap out the Context ClassLoader before i
by alex.loubyansky@jboss.com
BTW, if I do set the context classloader to the current one in XB before creating the parser and re-setting it back right after that, the WAR still fails to deploy with
15:30:31,315 ERROR [org.apache.catalina.startup.TldConfig] Exception processing JAR at resource path C:\Users\avoka\svn.jboss.org\jbossas\trunk\build\
| output\jboss-6.0.0.Alpha1\server\default\tmp\abc3-lk3pm-fyk3ox7w-1-fyk3pue5-9p\nexj-web.war\WEB-INF\lib\xercesImpl.jar in context /nexj-web: java.io.F
| ileNotFoundException: C:\Users\avoka\svn.jboss.org\jbossas\trunk\build\output\jboss-6.0.0.Alpha1\server\default\tmp\abc3-lk3pm-fyk3ox7w-1-fyk3pue5-9p\
| nexj-web.war\WEB-INF\lib\xercesImpl.jar (Access is denied)
| at java.util.zip.ZipFile.open(Native Method)
| at java.util.zip.ZipFile.<init>(ZipFile.java:203)
| at java.util.jar.JarFile.<init>(JarFile.java:132)
| at java.util.jar.JarFile.<init>(JarFile.java:97)
| at org.apache.catalina.startup.TldConfig.tldScanJar(TldConfig.java:461)
| at org.apache.catalina.startup.TldConfig.execute(TldConfig.java:301)
| at org.apache.catalina.core.StandardContext.processTlds(StandardContext.java:4540)
| at org.apache.catalina.core.StandardContext.start(StandardContext.java:4308)
| at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:310)
| at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)
| at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:462)
| at org.jboss.web.deployers.WebModule.startModule(WebModule.java:116)
| at org.jboss.web.deployers.WebModule.start(WebModule.java:95)
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4250410#4250410
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4250410
16 years, 7 months