java.lang.ClassNotFoundException : com/sun/xml/ws/policy/PolicyException

Problem

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


java.lang.ClassNotFoundException: 
	com/sun/xml/ws/policy/PolicyException

Solution

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

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

3 comments on “java.lang.ClassNotFoundException : com/sun/xml/ws/policy/PolicyException

  1. How to add that to a springboot app with embedded tomcat ?

    Reply

Leave a Comment

Your email address will not be published. Required fields are marked *