Skip to main content

WSIT installer integration with JDK6 improved

Posted by hofsass on August 22, 2007 at 3:30 PM PDT

When using WSIT with JDK6 (initial release and updates 1 and 2), there are conflicting versions of the JAX-WS APIs. Specifically, JDK6 ships with JAX-WS 2.0 APIs and WSIT ships with JAX-WS 2.1 APIs.

To get around this problem, it is necessary to copy the WSIT 'webservices-api.jar' file to $JAVA_HOME/lib/endorsed. This will ensure that the JVM loads the JAX-WS 2.1 APIs rather than its original JAX-WS 2.0 APIs.

Previously this was supported but in a rather awkward manner. In a JDK6 scenario, the user either needed to run an extra target or add a special argument to the command invocation.

Changes have been made to the WSIT install scripts for both GlassFish (wsit-on-glassfish.xml) and Tomcat (wsit-on-tomcat.xml) to improve the installation process when using JDK6.

Now, when the install script detects that JDK6 is in use, it will automatically attempt to copy the webservices-api.jar into $JAVA_HOME/lib/endorsed directory, creating the directory if necessary. With the updates, the user needs only to run the main 'install' target.

This will fail if the user has insufficient privileges on the JAVA_HOME directory, i.e. no write privileges. This seems most likely to occur when there is a system-wide installation of Java that is being used to support the container and WSIT. In this case, if the user can not get sufficient privileges, then a private copy of the JDK would be necessary.

Set AS_HOME then invoke ant:

ant -f wsit-on-glassfish.xml install

Set CATALINA_HOME then invoke ant:

ant -f wsit-on-tomcat.xml install