title: how to deploy JAX-RS application using jersey in websphere 8.5
body: <p>When I deploy my app.war in websphere 7.0. The restful web service was successful initialized.<br>But after I upgrade to websphere 8.5 . It failed to deploy the restful web service class.
  <br>Below is my app.war's pom.xml for jersey.</p>
  
  <pre><code>    &lt;!-- restful web service --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax.ws.rs&lt;/groupId&gt;
          &lt;artifactId&gt;jsr311-api&lt;/artifactId&gt;
          &lt;version&gt;1.1.1&lt;/version&gt;
          &lt;optional&gt;true&lt;/optional&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;asm&lt;/groupId&gt;
          &lt;artifactId&gt;asm-all&lt;/artifactId&gt;
          &lt;version&gt;3.2&lt;/version&gt;
          &lt;optional&gt;true&lt;/optional&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;com.sun.jersey&lt;/groupId&gt;
          &lt;artifactId&gt;jersey-core&lt;/artifactId&gt;
          &lt;version&gt;1.17&lt;/version&gt;
          &lt;scope&gt;compile&lt;/scope&gt;
      &lt;/dependency&gt;
  
       &lt;dependency&gt;
          &lt;groupId&gt;com.sun.jersey&lt;/groupId&gt;
          &lt;artifactId&gt;jersey-servlet&lt;/artifactId&gt;
          &lt;version&gt;1.17&lt;/version&gt;
         &lt;scope&gt;compile&lt;/scope&gt;
      &lt;/dependency&gt;  
  
       &lt;dependency&gt;
          &lt;groupId&gt;com.sun.jersey&lt;/groupId&gt;
          &lt;artifactId&gt;jersey-server&lt;/artifactId&gt;
          &lt;version&gt;1.17&lt;/version&gt;
         &lt;scope&gt;compile&lt;/scope&gt;
      &lt;/dependency&gt;  
  
      &lt;dependency&gt;
          &lt;groupId&gt;com.sun.jersey&lt;/groupId&gt;
          &lt;artifactId&gt;jersey-json&lt;/artifactId&gt;
          &lt;version&gt;1.17&lt;/version&gt;
          &lt;scope&gt;compile&lt;/scope&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>Below is my web.xml</p>
  
  <pre><code>  &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;com.tag.services.testrsws&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;/rs/*&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;
  &lt;/web-app&gt; 
  </code></pre>
  
  <p>Below is the websphere error log when start the app:</p>
  
  <blockquote>
    <p>[13-3-1 13:22:44:103 CST] 000003b5 PackagesResou I   Scanning for root resource and provider classes in the packages:
      com.tag.services.testrsws
    <br>[13-3-1 13:22:44:123 CST] 000003b5 servlet       E com.ibm.ws.webcontainer.servlet.ServletWrapper init Uncaught.init.exception.thrown.by.servlet
    <br>[13-3-1 13:22:44:124 CST] 000003b5 webapp        E com.ibm.ws.webcontainer.webapp.WebApp commonInitializationFinally SRVE0266E: init servlet error：{0}
                                     javax.servlet.ServletException: SRVE0207E: servlet create uncaught exception thrown by servlet
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:398)
    <br>...
    <br>...
    <br> Caused by: <strong>java.lang.IncompatibleClassChangeError: org.objectweb.asm.ClassVisitor</strong>
        at java.lang.ClassLoader.defineClassImpl(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:262)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:69)
        at com.ibm.ws.classloader.CompoundClassLoader._defineClass(CompoundClassLoader.java:852)
        at com.ibm.ws.classloader.CompoundClassLoader.localFindClass(CompoundClassLoader.java:762)
        at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:585)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:627)
        at java.lang.J9VMInternals.verifyImpl(Native Method)
        at java.lang.J9VMInternals.verify(J9VMInternals.java:85)
        at java.lang.J9VMInternals.verify(J9VMInternals.java:83)
        at java.lang.J9VMInternals.initialize(J9VMInternals.java:162)
        at com.sun.jersey.api.core.ScanningResourceConfig.init(ScanningResourceConfig.java:79)
        at com.sun.jersey.api.core.PackagesResourceConfig.init(PackagesResourceConfig.java:104)
        at com.sun.jersey.api.core.PackagesResourceConfig.(PackagesResourceConfig.java:78)
        at com.sun.jersey.api.core.PackagesResourceConfig.(PackagesResourceConfig.java:89)
        at com.sun.jersey.spi.container.servlet.WebComponent.createResourceConfig(WebComponent.java:696)
        at com.sun.jersey.spi.container.servlet.WebComponent.createResourceConfig(WebComponent.java:674)
        at com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:203)
        at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:374)
        at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:557)
        at javax.servlet.GenericServlet.init(GenericServlet.java:161)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:336)</p>
  </blockquote>
  
  <p>After search by google , some one says it may be webshpere server already contain the asm. So I  delete the asm.jar from my app.war WEB-INF/lib. But it still has the error.</p>