Service Registry 3.1 Release Notes

6463868: Client Program or Server That Uses JDK 1.6 Results in Errors

Problem Summary: If a JAXR client program runs in a JDK 1.6 environment, or if Service Registry is deployed on a system that is running JDK 1.6, runtime errors result when the program performs a query or publish operation. The underlying problem is that JDK 1.6 uses version 1.3 of the SOAP with Attachments API for Java (SAAJ), while Application Server uses version 1.2.

Workaround: There are two types of workarounds required, one for the client system and one for the server.

ProcedureTo Perform the Client System Workaround

The client system workaround is required if the client system is running JDK 1.6. This workaround involves the following tasks:

  1. Make sure that your classpath includes the following JAR files:

    On Solaris OS:

    /usr/share/lib/saaj-api.jar
    /usr/share/lib/saaj-impl.jar

    On Linux and HP-UX systems:

    /opt/sun/share/lib/saaj-api.jar
    /opt/sun/share/lib/saaj-impl.jar

    For example, if your Ant targets for a Linux system include a setting like the following, your classpath is correct:

    <path id="classpath">
      <fileset dir="/opt/sun/share/lib">
        <include name="*.jar"/>
      </fileset>
      ...
    </path>
  2. Add the following <sysproperty> tags to the <java> targets in your build.xml files:

    <sysproperty key="javax.xml.soap.MessageFactory" 
       value="com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl"/>
    <sysproperty key="javax.xml.soap.MetaFactory" 
       value="com.sun.xml.messaging.saaj.soap.SAAJMetaFactoryImpl"/>
    <sysproperty key="javax.xml.soap.SOAPConnectionFactory" 
       value="com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnectionFactory"/>
    <sysproperty key="javax.xml.soap.SOAPFactory" 
       value="com.sun.xml.messaging.saaj.soap.ver1_1.SOAPFactory1_1Impl"/>

ProcedureTo Perform the Server System Workaround

The server system workaround involves the following tasks:

  1. Change to the Application Server lib directory.

    On Solaris OS: cd /opt/SUNWappserver/appserver/lib

    On Linux and HP-UX systems: cd /opt/sun/appserver/lib

  2. Make backup copies of the two SAAJ JAR files in the Application Server lib directory. For example:


    cp saaj-api.jar saaj-api.jar.v1.2
    cp saaj-impl.jar saaj-impl.jar.v1.2
    
  3. Copy the SAAJ 1.3 JAR files to the Application Server lib directory.

    On Solaris OS:


    cp /usr/share/lib/saaj-api.jar .
    cp /usr/share/lib/saaj-impl.jar .
    

    On Linux and HP-UX systems:


    cp /opt/sun/share/lib/saaj-api.jar .
    cp /opt/sun/share/lib/saaj-impl.jar .
    
  4. Log in to the Application Server Admin Console as described in To Use the Application Server Admin Console in Service Registry 3.1 Administration Guide.

  5. Expand the Configurations node.

  6. Expand the server node, server-config (Admin Config).

  7. Click JVM Settings.

  8. Click the JVM Options tab.

  9. Click Add JVM Option.

  10. In the text field, type the following:


    -Djavax.xml.soap.MessageFactory=com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl
    
  11. Click Add JVM Option again.

  12. In the text field, type the following:


    -Djavax.xml.soap.MetaFactory=com.sun.xml.messaging.saaj.soap.SAAJMetaFactoryImpl
    
  13. Click Save.

  14. Follow the instructions in To Stop and Restart the Application Server Domain for the Registry in Service Registry 3.1 Administration Guide.