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.

mkyong

Founder of Mkyong.com, passionate Java and open-source technologies. If you enjoy my tutorials, consider making a donation to these charities.

3 Comments
Most Voted
Newest Oldest
Inline Feedbacks
View all comments
avishek
7 years ago

there is no any policy.jar file

Saurabh Sharma
6 years ago

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

Christian Straube
14 years ago

Thank you very much for that hint 🙂 You saved my hours!!