title: Jersey on was 6.1 : Wrong class definition loaded from WAS plugin directory
body: <p>Trying to test a jax rs Jersey application on WAS 6.1, I'm facing the following issue : Jersey needs asm 3.1, especially for the ClassReader class, but an uncompatible version of this class is loaded from WAS plugins directory.</p>
  
  <p>the wrong class definition is loaded from :<br>
  file:/C:/Program Files/IBM/SDP70/runtimes/base_v61/plugins/com.ibm.wsfp.main_6.1.0.jar</p>
  
  <p>If I run my application as it, I get a noSuchMethodError : </p>
  
  <pre><code>java.lang.NoSuchMethodError:     org/objectweb/asm/ClassReader.accept(Lorg/objectweb/asm/ClassVisitor;I)V
      at  com.sun.jersey.server.impl.container.config.AnnotatedClassScanner.analyzeClassFile(AnnotatedClassScanner.java:322)
      at com.sun.jersey.server.impl.container.config.AnnotatedClassScanner.indexDir(AnnotatedClassScanner.java:271)
  </code></pre>
  
  <p>....</p>
  
  <p>If I remove this jar from the plugins directory, my asm jar in 3.1 version is picked up and everything is fine.</p>
  
  <p>So here is my question : <strong>what is the good way of dealing with this kind of situation ?</strong> Isn't there a way to tell the server to pick up my jar instead of its jar when I givi it to him ?</p>
  
  <p>Complete problem description <a href="http://mathieuhicauber-java.blogspot.fr/2012/12/jax-rs-jersey-on-was-61-asm-classreader.html" rel="nofollow">here</a>.</p>
  
  <p>Thank you,</p>
  
  <p>Mathieu.</p>