title: Jersey No WebApplication provider is present when jersey-* dependency added
body: <p>I have a simple Spring &amp; Jersey application, which works perfectly well for consuming requests through a simple Resource.  However, I'd like to return a JSON response - containing a simple JSON serialization of an object.  To achieve this, I've added a maven dependency for <code>jersey-json</code>.  As soon as I add this dependency, however, I get this error at server startup:</p>
  
  <pre><code>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:391)
  </code></pre>
  
  <p>I'm not totally clear upon exactly what a provider is, but I'm pretty certain that there should be a default one found.</p>
  
  <p>For completeness, here's my Resource:</p>
  
  <pre><code>@Path("/scan")
  @Resource
  @Component
  public class ScanResource {
      @GET
      @Produces(MediaType.APPLICATION_JSON)
      @Path("/{barcode}")
      public List&lt;Scan&gt; getScansForBarcode(@PathParam("barcode") Long barcode){
          ..snip..
          return results;
      }
  }
  </code></pre>
  
  <p>A Scan object is a simple Entity Bean object.</p>
  
  <p>The mvn dependency is:</p>
  
  <pre><code>&lt;dependency&gt;
      &lt;groupId&gt;com.sun.jersey&lt;/groupId&gt;
      &lt;artifactId&gt;jersey-json&lt;/artifactId&gt;
      &lt;version&gt;1.11&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>Does anyone know why I might be getting the <code>No WebApplication provider is present</code> Exception?  Any thoughts on how I might resolve it?</p>
  
  <p>Thanks</p>