3

I just want to know the inputs for below questions.

what version of AXIS2 will come with Websphere 8.5.5.2?

Where can i see the version details of AXIS2 jars shipped with WAS 8.5.5.2?

My code actually compiled with AXIS2 1.6.1 and deployed the same in WAS 8.5.5.2. I am getting below classcast exceptions. What could your suggestions to resolve this issue. I thought there is problem with different versions of axis2 while compiling and deploying. I am not able to know what version of axis2 shipped with websphere 8.5.5.2.

Approaches I have used.

1) Part of code which uses Axis was compiled against AXIS2 1.6.1 version and generated war was deployed in WAS 8.5.5.2 with no libraires in WAR. Got classNotFoundException for org.apache.axiom.util.stax.XMLStreamWriterUtils. Added org.apache.axis2.jar located in plugins in shared libraries and attached to my server war module level. Then class cast exception came.

2) Part of code which uses Axis was compiled against AXIS2 1.6.1 and generated war was deployed in WAS 8.5.5.2 with org.apache.axis2.jar under WEB-INF/libraires in WAR. Then class cast exception came.

Calling getRendererRef(): renderer Type=[OutInRenderer]
WSRenderer    I   Start: 
WSRenderer    E   Unable to perform rendering due to exception (java.lang.ClassCastException:      org.apache.axiom.util.stax.xop.XOPEncodingStreamWriter incompatible with org.apache.axiom.ext.stax.datahandler.DataHandlerWriter)
WSRenderer    E   stacktrace=org.apache.axiom.util.stax.XMLStreamWriterUtils.internalGetDataHandlerWriter(XMLStreamWriterUtils.java:71)

org.apache.axiom.util.stax.XMLStreamWriterUtils.writeDataHandler(XMLStreamWriterUtils.java:134)

3) Kept Parent_LAST option in WAS 8.5.5.2 for server war which results plenty of errors related to parsers and other. Application stopped working because of many classcast and incompatible issues. Any inputs are appreciable...

Naresh
  • 147
  • 4
  • 14
  • I don't know enough about webservices to answer the real questions, but WebSphere Application Server (the full profile) ships a custom/forked copy of Axis. Direct use of Axis APIs is not supported: http://www-01.ibm.com/support/knowledgecenter/SSAW57_8.5.5/com.ibm.websphere.nd.doc/ae/rwbs_faq.html – Brett Kail Feb 04 '16 at 19:52
  • @Naresh. Curious to know the solution for this issue.I am running into exact same issue.Setting Parent_Last breaks everything ... – Krithika Vittal Feb 01 '20 at 04:32

1 Answers1

0

The code in the WebSphere runtime is not based on an official release of Apache Axis2, but on a fork created from a development version. Your only option to use Axis2 on WebSphere is to configure your application with parent last class loading. To make this work you need to remove from your application all the JARs containing APIs that must be loaded from the server runtime, such as the servlet API and various XML APIs.

Andreas Veithen
  • 8,868
  • 3
  • 25
  • 28