cancel
Showing results for 
Search instead for 
Did you mean: 

JAXWS 2.1.3 in heavy loader issue

Former Member
0 Kudos

Hi

We are using heavy loader for one of our web services (JAXWS2.1.3Lib), however when casting DataHandler to StreamingDataHandler an error occurs (please see below).

JAXWS2.1.3Lib contains activation.jar, but for some reason the server is using the default sap one. Is there any way of making sure the heavy loader library takes precedence?


java.lang.ClassCastException: class javax.activation.DataHandler:library:mail-activation-iaik+at+com.sap.engine.boot.loader.ResourceMultiParentClassLoader28825459+at+alive incompatible with class com.sun.xml.ws.developer.StreamingDataHandler:sap.com/JAXWS2.1.3Lib+at+com.sap.engine.boot.loader.ResourceMultiParentClassLoader+at+6231eaa6+at+alive

      at com.sun.xml.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:188)

      at com.sun.xml.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:116)

I have had to replace the @ symbol with at (just fyi)

Regards,

Andrew

Accepted Solutions (1)

Accepted Solutions (1)

Vlado
Advisor
Advisor
0 Kudos

Hi Andrew,

You cannot override standard Java EE libs. There's a paragraph in the Java EE spec (EE.8.2.3) that says:

Note that if the library is also a required component of the Java EE platform version on which the application is being deployed, the platform version may (and typically will) take precedence.

JAF (Java Activation Framework), for example, is such library.

Regards,

\-- Vladimir

Answers (1)

Answers (1)

Former Member
0 Kudos

Many thanks Vladimir - that answers my question.

Just to clarify then - it is not possible to override the JAXWS libraries, and as such implement MTOM streaming with SAP Netweaver 7.1 SP3?

Regards,

Andrew

Vlado
Advisor
Advisor
0 Kudos

It is not possible to override the JAX-WS API, though it might be possible to change the implementation. However, this would require a clear separation between the API and impl so that you override only the impl part. But I should add that I've never tried that.

Cheers,

\-- Vladimir