1

在过去的两个晚上,对这个问题一无所知,Websphere 7 上的 Apache CXF 部署似乎不起作用。

环境:cxf 2.4.1,websphere 7.0.0.17,web-inf/lib 中的 Jars 没有woodstox / jaxb-impl。类加载策略 - 父级最后,DisableIBMJaxWsEngine = True

我们的 CXF 使用 APP 包含 CXF 客户端和服务。RS 服务似乎接收请求并处理它们,但客户端组件不断失败并出现以下错误:

Caused by: java.lang.VerifyError: org/w3c/dom/Node.setUserData(Ljava/lang/String;Ljava/lang/Object;Lorg/w3c/dom/UserDataHandler;)Ljava/lang/Object;   
org.apache.cxf.staxutils.StaxUtils.addLocation(StaxUtils.java:1083)   
org.apache.cxf.staxutils.StaxUtils.readDocElements(StaxUtils.java:971)
org.apache.cxf.staxutils.StaxUtils.readDocElements(StaxUtils.java:947)
org.apache.cxf.staxutils.StaxUtils.read(StaxUtils.java:874)   
org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:226)   
org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:186)   
org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:92)   
org.apache.cxf.jaxws.ServiceImpl.initializePorts(ServiceImpl.java:203)
org.apache.cxf.jaxws.ServiceImpl.<init>(ServiceImpl.java:147)   
org.apache.cxf.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:90)
javax.xml.ws.Service.<init>(Service.java:67)
4

2 回答 2

1

我在使用 CXF + XmlBeans + WebSphere 时遇到了类似的问题,我通过使用 truezip-maven-plugin 从 XmlBeans 依赖项中删除 org/w3c/dom 包来解决它。

于 2012-04-12T10:59:01.897 回答
1

Vineet 这显然是由于 Xerces 解析器不匹配而导致的错误。使用以下技巧查找执行服务时使用的确切 jar。org.apache.xerces.parsers.DOMParser.class.getProtectionDomain().getCodeSource().getLocation()

然后验证版本并替换为最新版本。

如果它没有解决,那么对每个冲突的 jar 重复练习 saaj-api.jar saaj-impl.jar xalan.jar xercesImpl.jar xml-apis.jar jaxb-api.jar jaxb-impl.jar

于 2011-08-30T05:24:39.413 回答