-
1. Re: JBoss 3.2 jar conflicts (castor, xalan)
frito May 22, 2003 2:38 AM (in response to jherbers)You can use this part for configuring JBoss to use an own loader repository for e.g. every ear (when used in jboss-app.xml):
[pre]
<jboss-app>
<loader-repository>yam.com:loader=bean1.ear
<loader-repository-config>java2ParentDelegation=false</loader-repository-config>
</loader-repository>
</jboss-app>
[/pre]
The name of the repository must be unique and the config tag says JBoss to change the behaviour of classloaders by first asking the child for resources, then delegating to the parent.
Greetings,
Frito -
2. Re: JBoss 3.2 jar conflicts (castor, xalan)
jherbers May 23, 2003 11:38 AM (in response to jherbers)Thanks for the suggestion. I tried it with 3.2.1 (jetty) and got the following.
2003-05-23 11:30:38,895 ERROR [org.jboss.deployment.MainDeployer] could not start deployment: file:/D:/jboss-3.2.1/server/default/tmp/deploy/server/default/deploy/Tcdc.ear/22.Tcdc.ear-contents/Tcdc.war
java.lang.Error: java.lang.ClassCastException: org.apache.xerces.jaxp.SAXParserFactoryImpl
at org.mortbay.xml.XmlParser.(XmlParser.java:65)
at org.mortbay.jetty.servlet.WebApplicationContext.start(WebApplicationContext.java:326)
at org.mortbay.j2ee.J2EEWebApplicationContext.start(J2EEWebApplicationContext.java:85)
at org.jboss.jetty.JBossWebApplicationContext.start(JBossWebApplicationContext.java:89)
at org.jboss.jetty.Jetty.deploy(Jetty.java:331)
at org.jboss.jetty.JettyService.performDeploy(JettyService.java:242) -
3. Re: JBoss 3.2 jar conflicts (castor, xalan)
frito May 26, 2003 2:42 AM (in response to jherbers)Are you using a "tuned" version of JBoss, since this works for me with 3.2.0 (and I think I tried this with 3.2 HEAD, too)?
My ear contains xerces.jar and castor.jar .
Greetings,
Frito -
4. Re: JBoss 3.2 jar conflicts (xerces, castor, xalan)
jherbers May 27, 2003 5:24 PM (in response to jherbers)Frito, thanks for the response. I don't think we are using a "tuned" version - I'm just dropping the EAR into the default server deploy dir, I don't think I've done anything else special to my installation.
Obviously including the jboss-app.xml files as you described is having an effect, because with it included the EAR won't even deploy (whereas before I didn't get errors until a client caused code that references one of these jars to be run).
I don't know much about how JBoss does XML processing (and I'm not a xerces expert either). But I don't see a Xerces jar in its lib dir, so could the problem be that JB has its own implementation of SaxParser that is not compatible with Xerces, thus giving the ClassCastException? -
5. Re: JBoss 3.2 jar conflicts (castor, xalan)
jonlee May 27, 2003 9:20 PM (in response to jherbers)Strange. You should be seeing a xercesImpl.jar in the topmost lib directory of the distribution.
Maybe I'm missing something here, but can JBoss use the newer xalan and castor distributions? That is, have the APIs changed so that you can't replace JBoss's copies with the new ones? -
6. Re: JBoss 3.2 jar conflicts (castor, xalan)
jonlee May 27, 2003 10:11 PM (in response to jherbers)On 3.2.0, tried with xalan 2.5.0 distribution - doesn't like the xercesImpl or xml-apis being replaced (in top most lib). Also deleted the xml-apis floating around in my instance libs. Replaced xalan in server/default/lib with xalan 2.5.0 (2.5 Mb file !!!).
Seems to work ok. Deployed range of beans, wars and ears and they worked ok. Does that help any? -
7. Re: JBoss 3.2 jar conflicts (castor, xalan)
frito May 28, 2003 5:05 AM (in response to jherbers)Oops, posted in the wrong place, but works for both, I think ;-)
http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t= -
8. Re: JBoss 3.2 jar conflicts (castor, xalan)
jherbers May 30, 2003 4:52 PM (in response to jherbers)Jonlee: You're right, Xerces.impl is in JB's top-level lib dir, I had only been looking in server\default\lib. From what you're finding, it's takes a manual process to configure JBoss 3.2 to allow the use of newer xalan, castor and xerces jars by our apps. Bummer!