简体   繁体   English

在Websphere服务器上部署JAXWS Web服务时出错

[英]Error deploying JAXWS webservice on Websphere server

I am deploying JAX-WS webservice on websphere and when I am testing the same through soapUI, it is throwing below error. 我正在Websphere上部署JAX-WS Web服务,并且当我通过soapUI测试该服务时,它抛出了错误。 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. 注意:我已经将websphere中的classloader设置从父级优先更改为父级最后更改。

following are the jars in my war file. 以下是我的战争档案中的罐子。

jaxb-api-2.2.6.jar JAXB的API-2.2.6.jar

jaxb-impl-2.2.5.jar JAXB的IMPL-2.2.5.jar

jaxb-xjc-2.1.9.jar JAXB的XJC-2.1.9.jar

jaxws-api-2.1.jar JAXWS-API-2.1.jar

jaxws-maven-plugin-1.11.jar JAXWS-Maven的插件,1.11.jar

jaxws-rt-2.1.5.jar JAXWS-RT-2.1.5.jar

jaxws-tools-2.1.5.jar JAXWS工具-2.1.5.jar

Please advice what can be the issue? 请告知可能是什么问题? is it a common problem?? 这是一个普遍的问题吗?

IBM WebSphere comes out with its own JAX-WS implementation. IBM WebSphere推出了自己的JAX-WS实现。 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: 如果打算使用第三方JAX-WS提供程序,请尝试通过通过在清单文件中添加属性DisableIBMJAXWSEngine:true或通过添加以下JVM属性来禁用默认的提供程序:

com.ibm.websphere.webservices.DisableIBMJAXWSEngine=true

Reference links: 参考链接:

http://www-01.ibm.com/support/knowledgecenter/SSAW57_8.0.0/com.ibm.websphere.nd.doc/info/ae/ae/xrun_jvm.html?cp=SSAW57_8.0.0%2F1-16-5-474&lang=en http://www-01.ibm.com/support/knowledgecenter/SSAW57_8.0.0/com.ibm.websphere.nd.doc/info/ae/ae/xrun_jvm.html?cp=SSAW57_8.0.0%2F1-16- 5-474&郎= EN

http://www-01.ibm.com/support/docview.wss?uid=swg1PK96989 http://www-01.ibm.com/support/docview.wss?uid=swg1PK96989

I fixed it using the following in the code. 我使用以下代码修复了它。 I use WAS 8.5.5 with IBM JDK 1.6. 我将WAS 8.5.5与IBM JDK 1.6一起使用。 Hope this help. 希望能有所帮助。

System.setProperty("javax.xml.bind.JAXBContext", "com.sun.xml.internal.bind.v2.ContextFactory");

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM