Sunday 7 February 2016

java.lang.ClassNotFoundException: com.sun.jersey.spi.container.servlet.ServletContainer [Solution]

The error message clearly says that Java runtime is not able to find a class called ServletContainer for Jersey library. This is the Servlet class you have specified in the deployment descriptor of your application. It's similar to DispatcherServlet of Spring MVC and this error is similar to the error you get when DisplayServlet was not in the classpath.
Anyway, java.lang.ClassNotFoundException: com.sun.jersey.spi.container.servlet.ServletContainer comes when you are trying to use Jersey but have not added required dependency on your classpath e.g. those JAR files which contain the class "com.sun.jersey.spi.container.servlet.ServletContainer".
Read more »

No comments:

Post a Comment