-
1. Re: jboss-app.xml for class loading issue
ohmygod Dec 5, 2010 11:02 PM (in response to ohmygod)I made the jboss-app.xml (under globalsight.ear\META-INF directory) like:
<!DOCTYPE jboss-app PUBLIC
"-//JBoss//DTD J2EE Application 5.0//EN"
"http://www.jboss.org/j2ee/dtd/jboss-app_5_0.dtd">
<jboss-app>
<loader-repository>
com.example:loader=globalsight.ear
<loader-repository-config>java2ParentDelegation=false</loader-repository-config>
</loader-repository>
</jboss-app>and made jboss-web.xml (under globalsight-web.war\WEB-INF directory) like:
<!DOCTYPE jboss-web PUBLIC
"-//JBoss//DTD Web Application 5.0//EN"
"http://www.jboss.org/j2ee/dtd/jboss-web_5_0.dtd">
<jboss-web>
<loader-repository>
com.example:loader=globalsight.ear
<loader-repository-config>java2ParentDelegation=false</loader-repository-config>
</loader-repository>
</jboss-web>but got this error, could you advise? What order should I make in jboss-web.xml?
Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: loader-repository not found as a child of jboss-web in unordered_sequence: security-role* max-active-sessions? webservice-description* class-loading? jacc-star-role-allow? message-destination* servlet* replication-config? passivation-config? context-root? security-domain? virtual-host* use-session-cookies? depends* {unordered_sequence jndiEnvironmentRefsGroup}?
-
2. Re: jboss-app.xml for class loading issue
ohmygod Dec 6, 2010 12:18 AM (in response to ohmygod)adding node <class-loading java2ClassLoadingCompliance="false"> in front of <loader-repository> in jboss-web.xml fixes above error, but the classcast exception still happens.
11:26:43,437 ERROR [[/globalsight]] Exception sending context initialized event to listener instance of class org.jboss.web.jsf.integration.config.JBossJSFConfigureListener
java.lang.ClassCastException: org.apache.xerces.jaxp.SAXParserFactoryImpl cannot be cast to javax.xml.parsers.SAXParserFactoryCan Jboss 5.1.0 GA handle this problem now?
-
3. jboss-app.xml for class loading issue
ebross Mar 2, 2011 7:27 PM (in response to ohmygod)Hi Mike,
got this error, could you advise? What order should I make in jboss-web.xml?
The order is in the "caused by
java.lang.ClassCastException: org.apache.xerces.jaxp.SAXParserFactoryImpl cannot be cast to javax.xml.parsers.SAXParserFactory
Check that you are not packaging "xercesImpl.jar" with your jar. JBoss has its own copy.
Cheers.
-
4. Re: jboss-app.xml for class loading issue
mbo_paris Jan 18, 2012 11:13 AM (in response to ohmygod)java.lang.ClassCastException: org.apache.xerces.jaxp.SAXParserFactoryImpl cannot be cast to javax.xml.parsers.SAXParserFactory
hi there, i have the same jboss deployment problem while deploying my webapp under jboss-5.1.0.GA, i find these answer in an other internet post :
jboss jboss 5 web app packaging and classloading
I was facing classloading issue in Jboss 5.1 and the following worked for me like a miracle. Actually in jboss 5.x it is enabled by default so we need to comment that.
Unified classloader
In JBoss 4 in order to unify tomcat and jboss classloaders one had to change true
in jboss/server/default/deploy/jboss-web.deployer/META-INF/jboss-service.xml .
It is no longer the case in JBoss 5, instead the following has to be commented :
<!–
-1
javax.servlet,org.apache.commons.logging
–>
in jboss-5.1.0.GA/server/default/deployers/jbossweb.deployer/META-INF/war-deployers-jboss-beans.xml.