title: Jersey: No WebApplication provider is present
body: <p>I follow exact steps in this <a href="http://www.ibm.com/developerworks/library/wa-aj-tomcat/" rel="nofollow">http://www.ibm.com/developerworks/library/wa-aj-tomcat/</a>, and I included all the jars correctly(i believe). And I still got the errors like the following:</p>
  
  <pre><code>Jun 24, 2013 7:16:21 PM com.sun.jersey.api.core.ScanningResourceConfig init
  INFO: No provider classes found.
  Jun 24, 2013 7:16:21 PM org.apache.catalina.core.ApplicationContext log
  SEVERE: StandardWrapper.Throwable
  com.sun.jersey.api.container.ContainerException: No WebApplication provider is present
      at com.sun.jersey.spi.container.WebApplicationFactory.createWebApplication(WebApplicationFactory.java:69)
      at com.sun.jersey.spi.container.servlet.ServletContainer.create(ServletContainer.java:360)
      at com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.create(ServletContainer.java:275)
      at com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:585)
      at com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:213)
      at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:342)
      at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:516)
      at javax.servlet.GenericServlet.init(GenericServlet.java:160)
      at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)
      at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193)
      at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088)
      at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5123)
      at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5407)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
      at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
      at java.util.concurrent.FutureTask.run(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
  
  Jun 24, 2013 7:16:21 PM org.apache.catalina.core.StandardContext loadOnStartup
  SEVERE: Servlet /Jersey threw load() exception
  com.sun.jersey.api.container.ContainerException: No WebApplication provider is present
      at com.sun.jersey.spi.container.WebApplicationFactory.createWebApplication(WebApplicationFactory.java:69)
      at com.sun.jersey.spi.container.servlet.ServletContainer.create(ServletContainer.java:360)
      at com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.create(ServletContainer.java:275)
      at com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:585)
      at com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:213)
      at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:342)
      at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:516)
      at javax.servlet.GenericServlet.init(GenericServlet.java:160)
      at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)
      at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193)
      at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088)
      at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5123)
      at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5407)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
      at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
      at java.util.concurrent.FutureTask.run(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
  </code></pre>
  
  <p>I just did the first step, show hello. My web.xml and java file are the following:</p>
  
  <pre><code>package sample.hello.resources;
  
  import javax.ws.rs.GET;
  import javax.ws.rs.Path;
  import javax.ws.rs.Produces;
  import javax.ws.rs.core.MediaType;
  
  
  @Path("/hello")
  public class HelloResource {
      @GET
      @Produces(MediaType.TEXT_PLAIN)
      public String sayHello() {
          return "Hello Jersey";
      }
  } 
  </code></pre>
  
  <p>web.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5"&gt;
    &lt;display-name&gt;Jersey&lt;/display-name&gt;
    &lt;welcome-file-list&gt;
      &lt;welcome-file&gt;index.html&lt;/welcome-file&gt;
    &lt;/welcome-file-list&gt;
  
    &lt;servlet&gt;
      &lt;servlet-name&gt;Jersey REST Service&lt;/servlet-name&gt;
      &lt;servlet-class&gt;com.sun.jersey.spi.container.servlet.ServletContainer&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;sample.hello.resources&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 REST Service&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/rest/*&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;
  
  &lt;/web-app&gt;
  </code></pre>
  
  <p>I have been googling for a while, I couldn't find a good solution. 
  btw, my jar file list is:
  activation.jar
  asm-3.1.jar
  com.sun.jersey.jersey-server-1.4.0.jar
  jaxb-api-2.2.5.jar
  jaxb-impl-2.2_1.jar
  jersey-client.jar
  jersey-core.jar
  jersey-json-1.7.jar
  jersey-spring-1.11-b02.jar
  jsr311-api.1.1.1.jar
  stax-api.jar
  wstx-asl.jar</p>
  
  <p>these jars are recommended on the web. I copied them directly to the WEB-INF/lib folder. One thing I'm worry about is the path issue, someone shown me before that I should add some jars by right click the class project->build path and then add jars. I tried it as well, not good news. I'm running Tomcat7.0. The web runs to a error report page as well.Please help!</p>
  
  <p>I tried two local host link: 8080/Jersey/WEB-INF/web.xml  &amp; 8080/Jersey/rest/hello.  both fail!</p>
  
  <p>Thanks in advance. </p>