2 Replies Latest reply on Mar 22, 2004 12:39 PM by Scott Stark

    For ear containing war: Specifying loader-repository and inc

    john1 Newbie

      Here's my scenario:

      (0) Changing the jars in the JBoss lib or server/xxx/lib is not an option for this JBoss config.

      (1) My ear's jboss-app.xml specifies a loader repository because multiple versions of the same classes are deployed on the same server. I am not specifying any loader info in jboss-web.xml, or any stuff regarding Java2 vs. Servlet 2.3 classloading order.

      (2) I want to include versions of JAXP and XercesImpl that are different from the ones JBoss uses (i.e., that are in jboss/lib).

      However, I get class cast exceptions.

      The classloader for JAXP is what I would expect: It is using the loader repository I specified in my jboss-app.xml.

      However, the XercesImpl classes are using the loader org.jboss.system.server.NoAnnotationURLClassLoader@c3c749

      So when I do, say,
      DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
      I get the obvious class cast exception.

      What can I do?

      In particular, I would like the classes from XercesImpl to be the ones I've loaded with my war.

      John N.