Problem

Deploying a JAX-WS web service on Tomcat, hits following error message :

java.lang.ClassNotFoundException: 
	com.sun.xml.ws.transport.http.servlet.WSServletContextListener

Solution

The JAX-WS dependency library “jaxws-rt.jar” is missing.

  1. Go here http://jax-ws.java.net/.
  2. Download JAX-WS RI distribution.
  3. Unzip it and copy “jaxws-rt.jar” to Tomcat library folder “{$TOMCAT}/lib“.
  4. Restart Tomcat.

Reference

  1. WSServletContextListener JavaDoc
Tags :
Founder of Mkyong.com, love Java and open source stuff. Follow him on Twitter, or befriend him on Facebook or Google Plus. If you like my tutorials, consider making a donation to the charity, thanks.

Related Posts

Popular Posts