title: Setup Swagger for Jersey fails due to missing JerseyJaxrsConfig class
body: <p>I want to setup Swagger for Jersey REST API documentation and so I followed this guide on github: <a href="https://github.com/wordnik/swagger-core/wiki/Java-JAXRS-Quickstart" rel="nofollow">https://github.com/wordnik/swagger-core/wiki/Java-JAXRS-Quickstart</a>  </p>
  
  <p>I added the following to my Pom.xml:</p>
  
  <pre><code>&lt;dependency&gt;
  &lt;groupId&gt;com.wordnik&lt;/groupId&gt;
  &lt;artifactId&gt;swagger-jersey-jaxrs_2.10&lt;/artifactId&gt;
  &lt;version&gt;1.3.0&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>After saving this file, maven downloaded the following jars which seems to be correct:</p>
  
  <ul>
  <li>swagger-jersey-jaxrs_2.10-1.3.0.jar</li>
  <li>swagger-jaxrs_2.10-1.3.0.jar</li>
  <li>swagger-core_2.10-1.3.0.jar</li>
  </ul>
  
  <p>Then I am able to create some annotation with @Api, @ApiOperation, and so on. But the configuration is not finished yet.</p>
  
  <p>In my Web.xml i need to specify an additional Servlet "JerseyJaxrsConfig":</p>
  
  <pre><code>&lt;servlet&gt;
    &lt;display-name&gt;Rest Servlet&lt;/display-name&gt;
    &lt;servlet-name&gt;RestServlet&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;com.myprojectapp.rest;com.wordnik.swagger.jersey.listing&lt;/param-value&gt;
    &lt;/init-param&gt;
    &lt;init-param&gt;
      &lt;param-name&gt;com.sun.jersey.api.json.POJOMappingFeature&lt;/param-name&gt;
      &lt;param-value&gt;true&lt;/param-value&gt;
    &lt;/init-param&gt;
    &lt;init-param&gt;
      &lt;param-name&gt;com.sun.jersey.spi.container.ContainerRequestFilters&lt;/param-name&gt;
      &lt;param- value&gt;com.sun.jersey.api.container.filter.LoggingFilter;com.myprojectapp.authentication.SecurityFilter&lt;/param-value&gt;
    &lt;/init-param&gt;
    &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
  &lt;/servlet&gt;
  
  &lt;servlet&gt;
    &lt;servlet-name&gt;JerseyJaxrsConfig&lt;/servlet-name&gt;
    &lt;servlet-class&gt;com.wordnik.swagger.jersey.config.JerseyJaxrsConfig&lt;/servlet-class&gt;
      &lt;init-param&gt;
        &lt;param-name&gt;api.version&lt;/param-name&gt;
        &lt;param-value&gt;1.0.0&lt;/param-value&gt;
      &lt;/init-param&gt;
      &lt;init-param&gt;
        &lt;param-name&gt;swagger.api.basepath&lt;/param-name&gt;
        &lt;param-value&gt;http://localhost:8002/MyProjectApp/api&lt;/param-value&gt;
      &lt;/init-param&gt;
      &lt;load-on-startup&gt;2&lt;/load-on-startup&gt;
  &lt;/servlet&gt;
  </code></pre>
  
  <p>If I start Tomcat 7, I get the following ClassNotFoundException:</p>
  
  <blockquote>
    <p>SEVERE: Servlet /MyProjectApp threw load() exception
    java.lang.ClassNotFoundException: <strong>com.wordnik.swagger.jersey.config.JerseyJaxrsConfig</strong>
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
        at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:527)
        at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:509)
        at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:137)
        at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1144)
        at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088)
        at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5176)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5460)
        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)</p>
  </blockquote>
  
  <p>The weird thing is, that the servlet class "JerseyJaxrsConfig" already exists in one of the three recently downloaded jar files. So Eclipse is able to make a suggestion with this class when I type com.wordnik.swagger.jersey.config. But Tomcat is not able to find it on startup. Why? If I comment out the servlet "JerseyJaxrsConfig" in Web.xml then Tomcat runs with no errors. I tried several things like disabling my Quartz Job which starts with Tomcat, tried with other swagger versions or adding additional settings in Web.xml but with no success. </p>
  
  <p>My environment is the following
   - Eclipse with Maven
   - Jersey 1.81.1
   - Java EE 7
   - Tomcat 7
   - Swagger 1.3</p>
  
  <p>I appreciate your help.</p>