You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Eoghan Glynn <eo...@progress.com> on 2009/02/10 21:57:52 UTC
CXF on WebSphere6 - any good solutions on for the SAAJ version incompatibility?
Folks,
I'm tripping over a SAAJ version incompatibility when deploying a CXF 2.0.6 servlet to WebSphere 6.1.0.7.
CXF obviously requires SAAJ 1.3, and uses methods such as SOAPFactory.createFault() that didn't exist in SAAJ 1.2, which unfortunately is the version that WebSphere natively supports.
So while things work on the happy path, once a fault rears its ugly head, I see a predictable NoSuchMethodError:
javax/xml/soap/SOAPFactory.createFault()Ljavax/xml/soap/SOAPFault;
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:186)
...
Now I know similar issues have been raised in the past, and some ideas kicked around like just copying the SAAJ 1.3 API & impl jars into the WebSphere/AppServer/java/jre/lib/endorsed dir. But IIRC these simple approaches didn't yield any joy.
So does anyone have a proven way to work around the SAAJ version incompatibility?
Thanks,
Eoghan
RE: CXF on WebSphere6 - any good solutions on for the SAAJ version incompatibility?
Posted by Eoghan Glynn <eo...@progress.com>.
Needless to say, I shall update the wiki with this info.
-----Original Message-----
From: Eoghan Glynn [mailto:eoglynn@progress.com]
Sent: Wed 11/02/2009 12:17
To: users@cxf.apache.org; users@cxf.apache.org
Subject: RE: CXF on WebSphere6 - any good solutions on for the SAAJ version incompatibility?
Folks,
One of my colleagues figured this out (thanks Oli!).
So here's a quick summary of his approach for posterity:
(a) via the WAS Console->Environment->Shared Libraries, create 3 new shared libraries:
(i) saaj library containing the SAAJ API and impl jars
(ii) wsdl4j library containing the wsdl4j jar
(iii) a cxf library containing all the remaining CXF jars & 3rd party dependencies, except the following: geronimo-ejb_3.0_spec, geronimo-j2ee-connector_1.5_spec, geronimo-servlet_2.5_spec, jetty & jetty-util jars
(b) via the Console->Servers->Application Servers-><server name>->Java and Process Management->Classloader, create a new classloader referencing the libraries (a)(i)&(ii) above, with "Classes loaded with application classloader first" choosen from the drop down box.
(c) via Console->Applications->Enterprise Applications-><webapp name>->Shared library references, add the CXF library created in step (a)(iii) above.
Cheers,
Eoghan
-----Original Message-----
From: Eoghan Glynn [mailto:eoglynn@progress.com]
Sent: Tue 10/02/2009 20:57
To: users@cxf.apache.org
Subject: CXF on WebSphere6 - any good solutions on for the SAAJ version incompatibility?
Folks,
I'm tripping over a SAAJ version incompatibility when deploying a CXF 2.0.6 servlet to WebSphere 6.1.0.7.
CXF obviously requires SAAJ 1.3, and uses methods such as SOAPFactory.createFault() that didn't exist in SAAJ 1.2, which unfortunately is the version that WebSphere natively supports.
So while things work on the happy path, once a fault rears its ugly head, I see a predictable NoSuchMethodError:
javax/xml/soap/SOAPFactory.createFault()Ljavax/xml/soap/SOAPFault;
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:186)
...
Now I know similar issues have been raised in the past, and some ideas kicked around like just copying the SAAJ 1.3 API & impl jars into the WebSphere/AppServer/java/jre/lib/endorsed dir. But IIRC these simple approaches didn't yield any joy.
So does anyone have a proven way to work around the SAAJ version incompatibility?
Thanks,
Eoghan
RE: CXF on WebSphere6 - any good solutions on for the SAAJ version incompatibility?
Posted by Eoghan Glynn <eo...@progress.com>.
Folks,
One of my colleagues figured this out (thanks Oli!).
So here's a quick summary of his approach for posterity:
(a) via the WAS Console->Environment->Shared Libraries, create 3 new shared libraries:
(i) saaj library containing the SAAJ API and impl jars
(ii) wsdl4j library containing the wsdl4j jar
(iii) a cxf library containing all the remaining CXF jars & 3rd party dependencies, except the following: geronimo-ejb_3.0_spec, geronimo-j2ee-connector_1.5_spec, geronimo-servlet_2.5_spec, jetty & jetty-util jars
(b) via the Console->Servers->Application Servers-><server name>->Java and Process Management->Classloader, create a new classloader referencing the libraries (a)(i)&(ii) above, with "Classes loaded with application classloader first" choosen from the drop down box.
(c) via Console->Applications->Enterprise Applications-><webapp name>->Shared library references, add the CXF library created in step (a)(iii) above.
Cheers,
Eoghan
-----Original Message-----
From: Eoghan Glynn [mailto:eoglynn@progress.com]
Sent: Tue 10/02/2009 20:57
To: users@cxf.apache.org
Subject: CXF on WebSphere6 - any good solutions on for the SAAJ version incompatibility?
Folks,
I'm tripping over a SAAJ version incompatibility when deploying a CXF 2.0.6 servlet to WebSphere 6.1.0.7.
CXF obviously requires SAAJ 1.3, and uses methods such as SOAPFactory.createFault() that didn't exist in SAAJ 1.2, which unfortunately is the version that WebSphere natively supports.
So while things work on the happy path, once a fault rears its ugly head, I see a predictable NoSuchMethodError:
javax/xml/soap/SOAPFactory.createFault()Ljavax/xml/soap/SOAPFault;
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:186)
...
Now I know similar issues have been raised in the past, and some ideas kicked around like just copying the SAAJ 1.3 API & impl jars into the WebSphere/AppServer/java/jre/lib/endorsed dir. But IIRC these simple approaches didn't yield any joy.
So does anyone have a proven way to work around the SAAJ version incompatibility?
Thanks,
Eoghan