Apache CXF 2.7.11 on WebSphere 8.5

I have an application that provides web services to clients via CXF. This side of things works great.

The app also needs to act as a client itself and communicate with other servers, which is where I ran into problems.

With the "Parent First" class loaded, 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 the "Parent last" class loaded, the application cannot 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)

      

I tried to disable WebShere's native JSXWS engine via WAR manifest.mf, and no matter what I try with the "Parent last" class loading, I always get some error as above. Different class depending on which JAR I moved or replaced, but always check for error.

I've also looked through the official Apache documentation, various IBM manuals , countless blogs and forum posts are useless. I'm on my end with this

The same WARs work great on Tomcat, JBoss and WebLogic.

This is a complete list of all third party 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

      

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?

+3


source to share


2 answers


We had the same problem: there was 8.5 (jdk 1.7_64), CXF, JAXB and xmlbeans:

JAXB is the default xml / java binding used by CXF. Whether 8.5 the approved JAXB api definition 2.2.2 (in <WebSphere-dir>\AppServer\endorsed_apis\jaxb-api.jar

) and standard implementation (in JRE rt.jar

) were applied .

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

).

In the end, we decided this:



This is a complete list of all third party JAR files that we have successfully used:

  • CXF - * - 2.7.11.jar
  • dom4j-1.6.1.jar
  • EHCache-2.8.2.jar
  • Ehcache-core-2.5.1.jar
  • shoot-1.1.jar
  • Threads-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 will be helpful.

+4


source


PARENT_LAST: You may have a third party library in your deployment with the javax.activation.DataHandler class. Try removing activation-1.1.jar from your deployment.



This post may be helpful for you: LinkageError when trying to call a CXF / SOAP webservice

+1


source







All Articles