Reputation: 955
I am deploying JAX-WS webservice on websphere and when I am testing the same through soapUI, it is throwing below error. Please advice what can be the issue:
ClassCastException: com.ibm.xml.xlxp2.jaxb.JAXBContextImpl incompatible with com.sun.xml.bind.api.JAXBRIContext
Note: I have chanaged the classloader setting in websphere from parent first to parent last as well.
following are the jars in my war file.
jaxb-api-2.2.6.jar
jaxb-impl-2.2.5.jar
jaxb-xjc-2.1.9.jar
jaxws-api-2.1.jar
jaxws-maven-plugin-1.11.jar
jaxws-rt-2.1.5.jar
jaxws-tools-2.1.5.jar
Please advice what can be the issue? is it a common problem??
Upvotes: 0
Views: 3792
Reputation: 813
I fixed it using the following in the code. I use WAS 8.5.5 with IBM JDK 1.6. Hope this help.
System.setProperty("javax.xml.bind.JAXBContext", "com.sun.xml.internal.bind.v2.ContextFactory");
Upvotes: 0
Reputation: 1760
IBM WebSphere comes out with its own JAX-WS implementation. If you intend to use third-party JAX-WS provider, try to disable the default one, either by adding property DisableIBMJAXWSEngine: true into Manifest file, or by adding the following JVM property:
com.ibm.websphere.webservices.DisableIBMJAXWSEngine=true
Reference links:
http://www-01.ibm.com/support/docview.wss?uid=swg1PK96989
Upvotes: 4