Skip to Content.
Sympa Menu

mace-opensaml-users - Issues with using SUN's SAAJ libs on IBM JDK with OpenSAML

Subject: OpenSAML user discussion

List archive

Issues with using SUN's SAAJ libs on IBM JDK with OpenSAML


Chronological Thread 
  • From: Sidhartha Priye <>
  • To:
  • Subject: Issues with using SUN's SAAJ libs on IBM JDK with OpenSAML
  • Date: Sun, 21 Mar 2010 10:05:08 -0700 (PDT)
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=0irOoTIgetiDI22ZbKDAn17G0q1F5VTpqgp1LHSSeVgyaVsJtJhBH+xEtC4keib7pPt5zs3U0oE/3TJ+KLw8R4Tk9zCPxIi+8vpkZ2eISkOaQ7fxSc3Fq/d+q1ZyBaUNzBUN/TZKdN8LR3u+LP8TKscg08p9Glk4hGFAkERTV+Y=;

Gentlemen,

I am trying to use SUN's SAAJ1.3 libraries on IBM's JDK/Websphere 6.1 since Apache CXF webservices uses it. In order to do this I have to endorse those SAAJ1.3 libraries on Websphere under <WAS_INSTALL_ROOT>\java\jre\lib\endorsed. When this is done, WAS 6.1 throws the following error -

Caused by: java.lang.NoClassDefFoundError: com/sun/xml/messaging/saaj/soap/SOAPDocumentImpl
at com.sun.xml.messaging.saaj.soap.SOAPPartImpl.<init>(SOAPPartImpl.java:119)
at com.sun.xml.messaging.saaj.soap.ver1_1.Message1_1Impl.getSOAPPart(Message1_1Impl.java:109)
at com.sun.xml.messaging.saaj.soap.MessageImpl.init(MessageImpl.java:400)
... 30 more
CAUSE:
java.lang.NoClassDefFoundError: com/sun/xml/messaging/saaj/soap/SOAPDocumentImpl
at com.sun.xml.messaging.saaj.soap.SOAPPartImpl.<init>(SOAPPartImpl.java:119)
at com.sun.xml.messaging.saaj.soap.ver1_1.Message1_1Impl.getSOAPPart(Message1_1Impl.java:109)
at com.sun.xml.messaging.saaj.soap.MessageImpl.init(MessageImpl.java:400)
at com.sun.xml.messaging.saaj.soap.MessageImpl.<init>(MessageImpl.java:309)
at com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl.createMessage(SOAPMessageFactory1_1Impl.java:93)
at org.apache.axis2.saaj.SOAPEnvelopeTest.testDetachBody(SOAPEnvelopeTest.java:114)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:45)

SOAPDocumentImpl is part of saaj-impl, but it extends DocumentImpl from Sun's internal copy of Xerces! This explains the problem I am seeing with IBM's JDK. In order to resolve this issue, it requires adding the JAXP-ri-1.4.2 dependency in pom.xml -

<dependency>
<groupId>com.sun.xml.parsers</groupId>
<artifactId>jaxp-ri</artifactId>
<version>1.4.2</version>
<scope>test</scope>
</dependency>

So this is the recommended/universal approach to have the SUN's SAAJ libraries run on IBM JDK. However this breaks the OpenSAML 2.0 requirement to not use SUN's JAXP libraries and instead endorse it with their own xerces, xalan and xml-apis. Because of this restriction, all Webservice implementation- AXIS2, Apache CXF, SUN's JWSDP are breaking and thus cannot use OpenSAML 2.0. Has anyone run into this issue before and if yes what are the suggested means to address this problem.

thanks in advance
Sid






  • Issues with using SUN's SAAJ libs on IBM JDK with OpenSAML, Sidhartha Priye, 03/21/2010

Archive powered by MHonArc 2.6.16.

Top of Page