Sun Java System Application Server 9.1 Release Notes

Web Services

This section describes known web container issues and associated solutions.

Ant task wsimport fails with Java EE SDK b33d (using JDK 1.6) with NoClassDefFoundError (6527842)

Description

You may encounter a problem when running the JAX—WS tests with the JDK 1.6 included with the Java EE SDK b33d. The tests immediately abort with the following message:


[wsimport] Exception in thread "main" java.lang.NoClassDefFoundError: \
com/sun/tools/ws/WsImport

This error occurs even though the webservices-tools.jar does contain com/sun/tools/ws/WsImport.class, com/sun/tools/ws/ant/WsImport.class, and com/sun/tools/ws/ant/WsImport2.class. Moreover, the same test workspace works without problem using the 1.5.0-10 JDK.

Solution

Copy the webservices-api.jar to $JAVA_HOME/jre/lib/endorsed before running the JAX-WS tests.

publish-to-registry commands fail in IFR EE builds (6602046)

Description

JAXR uses SAAJ to send soap messages to the registry. In the non-IFR case, the SAAJ impl classes are under lib/webservices-rt.jar. In the IFR case, the SAAJ classes are still under lib/webservices-rt.jar. In addition, saaj-impl.jar is located in the /usr/share/lib directory. This jar file is picked up by Application Server and has precedence over classes from webservices-rt.jar. This jar file does not have the necessary security permissions to send soap messages to the Web services registry. The packaging should be modified to grant permissions to the jars under /usr/share/lib directory or not depend on the /usr/share/lib jars.

Solution

Add the following to the server.policy file:


grant codeBase "file:/usr/share/lib/saaj-impl.jar" {
   permission java.security.AllPermission;
};