Metro on JBoss
jackbauer42 Oct 11, 2011 12:55 PMHello Everyone. I'm currently working to get a web service deployment that relies on Metro deployed to JBoss 7. I have removed the JBoss WS references from my standalone configuration (brings in CXF by default) and that didn't cause any issues. I'm using the JAX-WS 2.2 API which is already available as a JBoss module. Deployment starts okay but then fails when it attempts to create the SAAJMetaFactoryImpl:
{code}
Caused by: javax.xml.soap.SOAPException: Unable to create SAAJ meta-factoryProvider com.sun.xml.internal.messaging.saaj.soap.SAAJMetaFactoryImpl not found
at javax.xml.soap.SAAJMetaFactory.getInstance(Unknown Source) [jboss-saaj-api_1.3_spec-1.0.1.Final.jar:1.0.1.Final]
at javax.xml.soap.MessageFactory.newInstance(Unknown Source) [jboss-saaj-api_1.3_spec-1.0.1.Final.jar:1.0.1.Final]
at com.sun.xml.ws.api.SOAPVersion.<init>(SOAPVersion.java:176) [webservices-rt-2.0.1.jar:1.0]
{code}
The class that can't be found is available in the Java 6 JRE. I'm not sure why JBoss is loading the jboss-saaj-api module even though I've not included JBoss WS as an extension within my startup configuration. The jboss saaj module tries to load a different class than what is provided by the JRE. Why can't the WAR's classloader see the SAAJ classes provided by the JRE? Is it possible to make JRE 6 classes available (will interfere with many of the javaee apis but perhaps it can be filtered)? I have tried to add the jboss-deployment-structure.xml to my application; defining a module exclusion for the SAAJ-API which has proved to be unsuccessful.
{code:xml}
<exclusions>
<module name="javax.xml.soap.api" />
</exclusions>
{code}
In the past, all issues that look like this have boiled down to classloading issues. From what I can tell, I haven't included any APIs within the WAR that should conflict with the JRE or JBoss provided APIs. Any pointers or suggestions would be much appreciated.
Thanks.