Jersey in Tomcat + Spring cannot find ComponentProvider. What for?

I deployed the Jersey on Tomcat and everything works fine (when I use com.sun.jersey.spi.container.servlet.ServletContainer), but as soon as I change it to com.sun.jersey.spi.spring.container.servlet. SpringServlet (according to all the tutorials I can find), I get an unpleasant exception:

Apr 19, 2009 5:07:35 PM org.apache.catalina.core.ApplicationContext log
INFO: Marking servlet ServletAdaptor as unavailable
Apr 19, 2009 5:07:35 PM org.apache.catalina.core.StandardContext loadOnStartup
SEVERE: Servlet /myservice threw load() exception
java.lang.ClassNotFoundException: com.sun.jersey.spi.service.ComponentProvider

Any idea which package / distribution it can reside? What am I missing?

Maybe I don’t need it at all. I'm trying to make sure that when my resource class is loaded, it will be Autowired and initialized by the rest of the Beans, it depends. Can this be done differently?

Thanks.

+3
source share
1

com.sun.jersey.spi.service.ComponentProvider JAR- JAR, , .

, (, 1.0.1, 1.0 1.0.1, Spring ).

, ContextLoaderListener web.xml, :

<listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
+1

Source: https://habr.com/ru/post/1706685/


All Articles