How to use SUN SAAJ classes on AIX with IBM JDK.

Solution Verified - Updated -

Environment

  • Fuse ESB 4.x
  • Fuse ESB 3.x
  • Fuse Services Framework

Issue

  • How to use SUN SAAJ classes on AIX with the IBM JDK?

  • How to specify SUN SAAJ classes with java.endorsed.dirs on AIX for IBM JDK?

Resolution

The IBM JDK does not ship with SUN SAAJ implementation or any SUN implemented Xerces library. This can cause problems when applications want to use SAAJ API's or SAAJ IN/OUT interceptors with CXF or as part of CXF-BC/CXF-SE component in ServiceMix.

If the application is using any of the SAAJ api's or interceptors it will not find SUN SAAJ classes or Xerces classes and will fail.

There are three ways to get around this:

  1. Locate and Isolate the SAAJ and Xerces specific classes from SUN JDK's rt.jar and repackage them in a new jar file.

  2. Download the JAXP reference implementation jar file from the JAXP Project Website

  3. Try the saaj-impl jar from java.net

In any of the 3 approaches you either need to copy the jar(s) into lib/endorsed folder inside your IBM JRE installation folder or you need to add

-Djava.endorsed.dirs=<directory> 

as a JVM property pointing to the jar right file.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments