How to fix java.lang.ClassNotFoundException: com.sun.jersey.spi.container.servlet.ServletContainer? [Solution]

yotube
0
The error message clearly says that the Java runtime is not able to find a class called ServletContainer for the 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".

Post a Comment

0Comments
Post a Comment (0)

#buttons=(Accept !) #days=(20)

Our website uses cookies to enhance your experience. Learn More
Accept !
To Top