WebSphere 8.5上的Apache CXF 2.7.11 [英] Apache CXF 2.7.11 on WebSphere 8.5

查看:162
本文介绍了WebSphere 8.5上的Apache CXF 2.7.11的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个通过CXF为客户端公开Web服务的应用程序。这方面的工作很完美。

I have an application that exposes web services for clients via CXF. This side of things works perfectly.

该应用程序还需要充当客户端本身并联系其他服务器,这就是我遇到问题的地方。

The application also needs to act as a client itself and contact other servers, this is where I am running into problems.

通过 Parent First类加载,我得到了这一点:

With "Parent First" classloading I get this:

Caused by: javax.xml.ws.WebServiceException: Error: Maintain Session is enabled but none of the session properties (Cookies, Over-written URL) are returned.
at org.apache.axis2.jaxws.ExceptionFactory.createWebServiceException(ExceptionFactory.java:173) ~[org.apache.axis2.jar:na]
at org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(ExceptionFactory.java:70) ~[org.apache.axis2.jar:na]
at org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(ExceptionFactory.java:118) ~[org.apache.axis2.jar:na]
at org.apache.axis2.jaxws.BindingProvider.setupSessionContext(BindingProvider.java:355) ~[org.apache.axis2.jar:na]
at org.apache.axis2.jaxws.BindingProvider.checkMaintainSessionState(BindingProvider.java:322) ~[org.apache.axis2.jar:na]
at org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.invokeSEIMethod(JAXWSProxyHandler.java:393) ~[org.apache.axis2.jar:na]
at ...

使用父辈类加载,应用程序甚至无法公开自己的服务:

With "Parent last" classloading the application can't even expose its own services:

[23/06/15 15:33:12:985 BST] 000002d3 servlet       E com.ibm.ws.webcontainer.servlet.ServletWrapper service Uncaught service() exception thrown by servlet cxf: java.lang.VerifyError: JVMVRFY013 class loading constraint violated; class=org/apache/cxf/jaxb/attachment/JAXBAttachmentUnmarshaller, method=getAttachmentAsDataHandler(Ljava/lang/String;)Ljavax/activation/DataHandler;, pc=0
at java.lang.J9VMInternals.verifyImpl(Native Method)
at java.lang.J9VMInternals.verify(J9VMInternals.java:85)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:162)

我尝试通过WAR的manifest.mf禁用WebShere自己的JAXWS引擎,无论我尝试使用 Parent last类加载如何,我总是会遇到一些错误,例如以上。不同的类取决于我已移动或替换的JAR,但始终是验证错误。

I have tried disabling WebShere's own JAXWS Engine via the WAR's manifest.mf and no matter what I try with "Parent last" classloading I always get some error like the above. A different class depending on what JAR I have moved or replaced, but always a verify error.

我也经历过正式的Apache文档,各种 IBM指南,无数的博客和论坛帖子均无济于事。

I have also gone through the official Apache documentation, various IBM guides, countless blog and forum posts to no avail. I am at my wit's end with this

同一个WAR可以在Tomcat,JBoss和WebLogic上完美运行。

The same WAR runs perfectly on Tomcat, JBoss and WebLogic.

这是所有第三方JAR文件的完整列表:

This is a complete list of all thirdparty JAR files:

activation-1.1.jar
antisamy-1.4.3.jar
aopalliance-1.0.jar
asm-3.3.1.jar
batik-css-1.7.jar
batik-ext-1.7.jar
batik-util-1.7.jar
bcprov-jdk15-1.46.jar
bsh-core-2.0b4.jar
commons-beanutils-1.7.0.jar
commons-beanutils-core-1.7.0.jar
commons-codec-1.3.jar
commons-collections-3.2.jar
commons-configuration-1.5.jar
commons-dbutils-1.6.jar
commons-digester-1.8.jar
commons-fileupload-1.3.1.jar
commons-httpclient-3.1.jar
commons-io-2.4.jar
commons-jexl-2.1.1.jar
commons-lang-2.4.jar
commons-logging-1.1.1.jar
cxf-api-2.7.11.jar
cxf-rt-bindings-soap-2.7.11.jar
cxf-rt-bindings-xml-2.7.11.jar
cxf-rt-core-2.7.11.jar
cxf-rt-databinding-jaxb-2.7.11.jar
cxf-rt-frontend-jaxws-2.7.11.jar
cxf-rt-frontend-simple-2.7.11.jar
cxf-rt-transports-http-2.7.11.jar
cxf-rt-ws-addr-2.7.11.jar
cxf-rt-ws-policy-2.7.11.jar
dom4j-1.6.1.jar
esapi-2.0.1.jar
FastInfoset-1.0.2.jar
geronimo-javamail_1.4_spec-1.7.1.ja
hamcrest-all-1.3.jar
hsqldb-1.8.0.10.jar
httpclient-4.3.6.jar
httpcore-4.3.3.jar
jaxen-1.1-beta-8.jar
jaxrpc-api-1.1.jar
jaxrpc-impl-1.1.3_01.jar
jaxrpc-spi-1.1.3_01.jar
joda-time-2.2.jar
js-1.7R2.jar
log4j-1.2.16.jar
logback-classic-0.9.21.jar
logback-core-0.9.21.jar
mail-1.4.7.jar
mailapi-1.4.3.jar
nekohtml-1.9.12.jar
not-yet-commons-ssl-0.3.9.jar
opensaml-2.6.1.jar
openws-1.5.1.jar
quartz-1.8.6.jar
saaj-api-1.3.5.jar
saaj-impl-1.3.jar
serializer-2.7.1.jar
slf4j-api-1.6.0.jar
slf4j-log4j12-1.6.0.jar
spring-aop-3.2.6.RELEASE.jar
spring-beans-3.2.6.RELEASE.jar
spring-context-3.2.6.RELEASE.jar
spring-core-3.2.6.RELEASE.jar
spring-expression-3.2.6.RELEASE.jar
spring-web-3.2.6.RELEASE.jar
stax2-api-3.1.4.jar
velocity-1.7.jar
vuelinkcore-20.2.3.jar
vueservlet-20.2.3.jar
woodstox-core-asl-4.2.1.jar
wsdl4j-1.6.3.jar
xml-apis-ext-1.3.04.jar
xml-resolver-1.2.jar
xmlsec-1.5.6.jar
xmltooling-1.4.1.jar
xom-1.1.jar

有人知道如何在WebSphere 8.5上获得Apache CXF 2.7.11以便能够充当服务器作为客户端吗?

Does anyone know how to get Apache CXF 2.7.11 on WebSphere 8.5 to be able to act as a server and as a client?

推荐答案

我们在使用Was 8.5(jdk 1.7_64),CXF,JAXB& xmlbeans:

We had the same problem using Was 8.5 (jdk 1.7_64), CXF, JAXB & xmlbeans:

JAXB是CXF使用的默认xml / java绑定。是8.5使用认可的JAXB api定义版本2.2.2(在< WebSphere-dir> \AppServer\endorsed_apis\jaxb-api.jar 中)和标准实现(在JRE rt.jar )中。

JAXB is the default xml/java binding used by CXF. Was 8.5 uses endorsed JAXB api definition version 2.2.2 (in <WebSphere-dir>\AppServer\endorsed_apis\jaxb-api.jar) and standard implementation (in JRE rt.jar).

Xmlbeans 2.4.x保存在org.w3c。*类中是(< WebSphere-dir> \AppServer\java_1.7_64\jre\lib\xml.jar )。

Xmlbeans 2.4.x holds inside org.w3c.* classes already present in Was (<WebSphere-dir>\AppServer\java_1.7_64\jre\lib\xml.jar).

最后我们解决了:

然后从我们的部署中删除以下jar:

then deleting from our deploy the following jar:


  • 激活-*,

  • stax-api- *(但不是stax2-api!),

  • jaxb-api-*,

  • jaxb-impl-*,

  • xercesImpl-*,

  • xml-apis-*

  • activation-*,
  • stax-api-* (but not stax2-api!),
  • jaxb-api-*,
  • jaxb-impl-*,
  • xercesImpl-*,
  • xml-apis-*

最后删除xmlbeas-2内部的所有org.w3c类。 x.jar

last deleting all org.w3c classes inside xmlbeas-2.x.jar

这是我们成功使用的所有第三方JAR文件的完整列表:

This is a complete list of all thirdparty JAR files we are successfully using:


  • cxf-*-2.7.11.jar

  • dom4j-1.6.1.jar

  • ehcache-2.8.2.jar

  • ehcache-core-2.5.1.jar

  • jettison-1.1.jar

  • neet hi-3.0.3.jar

  • ognl-3.0.6.jar

  • opensaml-2.6.1.jar

  • openws-1.5.1.jar

  • spring-*-3.2.13.RELEASE.jar

  • stax2-api-3.1。 1.jar

  • woodstox-core-asl-4.2.1.jar

  • wsdl4j-1.6.3.jar

  • wss4j-1.6.10.jar

  • xml-resolver-1.2.jar

  • xmlbeans-2.3.0-now3c .jar

  • xmlpull-1.1.3.1.jar

  • xmlschema-core-2.1.0.jar

  • xmlsec-1.5.4.jar

  • xmltooling-1.4.1.jar

  • xpp3_min-1.1.4c.jar

  • xstream-1.4.7.jar

  • cxf-*-2.7.11.jar
  • dom4j-1.6.1.jar
  • ehcache-2.8.2.jar
  • ehcache-core-2.5.1.jar
  • jettison-1.1.jar
  • neethi-3.0.3.jar
  • ognl-3.0.6.jar
  • opensaml-2.6.1.jar
  • openws-1.5.1.jar
  • spring-*-3.2.13.RELEASE.jar
  • stax2-api-3.1.1.jar
  • woodstox-core-asl-4.2.1.jar
  • wsdl4j-1.6.3.jar
  • wss4j-1.6.10.jar
  • xml-resolver-1.2.jar
  • xmlbeans-2.3.0-now3c.jar
  • xmlpull-1.1.3.1.jar
  • xmlschema-core-2.1.0.jar
  • xmlsec-1.5.4.jar
  • xmltooling-1.4.1.jar
  • xpp3_min-1.1.4c.jar
  • xstream-1.4.7.jar

我们希望这会有所帮助。

We hope this is helpful.

这篇关于WebSphere 8.5上的Apache CXF 2.7.11的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆