title: jersey servlet exception tomcat
body: <p>Am going nuts trying to start up a simple Jersey - Spring webapp. The error I get from Tomcat upon trying to access the web resources is:</p>
  
  <pre><code>HTTP Status 500 -
  
  type Exception report
  
  message
  
  description The server encountered an internal error () that prevented it from fulfilling this request.
  
  exception
  
  javax.servlet.ServletException: Servlet.init() for servlet Jersey Spring Web Application threw exception
      org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
      org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
      org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
      org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
      java.lang.Thread.run(Thread.java:619)
  
  root cause
  
  com.sun.jersey.api.container.ContainerException: No WebApplication provider is present
      com.sun.jersey.spi.container.WebApplicationFactory.createWebApplication(WebApplicationFactory.java:69)
      com.sun.jersey.spi.container.servlet.ServletContainer.create(ServletContainer.java:391)
      com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.create(ServletContainer.java:306)
      com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:607)
      com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:210)
      com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:373)
      com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:556)
      javax.servlet.GenericServlet.init(GenericServlet.java:212)
      org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
      org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
      org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
      org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
      java.lang.Thread.run(Thread.java:619)
  
  note The full stack trace of the root cause is available in the Apache Tomcat/6.0.28 logs.
  </code></pre>
  
  <p>My web.xml is as follows:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app version="2.4" 
      xmlns="http://java.sun.com/xml/ns/j2ee" 
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
      xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"&gt;
  &lt;context-param&gt;
          &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
          &lt;param-value&gt;classpath:application-context.xml&lt;/param-value&gt;
      &lt;/context-param&gt;
      &lt;listener&gt;
          &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt;
      &lt;/listener&gt;
      &lt;listener&gt;
          &lt;listener-class&gt;org.springframework.web.context.request.RequestContextListener&lt;/listener-class&gt;
      &lt;/listener&gt;
  
      &lt;servlet&gt;
          &lt;servlet-name&gt;Jersey Spring Web Application&lt;/servlet-name&gt;
          &lt;servlet-class&gt;com.sun.jersey.spi.spring.container.servlet.SpringServlet&lt;/servlet-class&gt;
  
          &lt;init-param&gt;
              &lt;param-name&gt;com.sun.jersey.config.property.packages&lt;/param-name&gt;
              &lt;param-value&gt;com.companyname.abc&lt;/param-value&gt;
          &lt;/init-param&gt;
          &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
      &lt;/servlet&gt;
  
      &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;Jersey Spring Web Application&lt;/servlet-name&gt;
          &lt;url-pattern&gt;/webresources/*&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>Any ideas what I'm doing wrong?</p>