Sun GlassFish Enterprise Server 2.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)


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: \

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.


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)


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 Enterprise 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.


Add the following to the server.policy file:

grant codeBase "file:/usr/share/lib/saaj-impl.jar" {

wscompile fails with "package javax.xml.rpc does not exist" on JDK6 u4 b3 (6638567)


The wscompile ant task fails for JDK 6 Update 4. For each JAX-RPC API class, the following error message is displayed:

package package-name does not exist


Before running the wscompile ant task, ensure that javaee.jar is specified in the class path, not j2ee.jar.