4 Replies Latest reply on Apr 14, 2011 10:49 AM by Ales Justin

    How to make JBoss using jaxws-rt bundled in WAR instead of jboss WS implementation

    Ma Va Newbie



      I've got webapp which works on JBoss 6.0.0, but I have to install it on JBoss 5.1.

      And it doesn't work because of conflict of JAXWS implementations on classpath.


      Exception which I get:

      Caused by: javax.xml.soap.SOAPException: Unable to create SAAJ meta-factoryorg.jboss.ws.core.soap.SAAJMetaFactoryImpl cannot be cast to javax.xml.soap.SAAJMetaFactory


      I want my web app to use jaxws-rt.jar bundled in WAR file, not jboss WS implementation.


      I believe problem is, that web-app classloader loads ...


      instead of



      My web-app has its own classloading domain with DefaultDomain as parent, so there is some kind of isolation.

      But If I understand it correctly, although I set parent-first="false",

      loading of java and javax packages is still delegated to the parent classloader.

      What is the policy for loading resource files (META-INF/services/javax.xml.ws.spi.Provider)?


      I've found the thread, which may be related to this issue:


      but I'm still confused.

      What should I put to the jboss-classloading-domain.xml file to make classloader to use jaxws-rt bundled in my WAR file?

      If it's not possible to do it declaratively in jboss 5.1, what should I implement (is there any tutorial how to do it)?