title: java.lang.IllegalArgumentException on tomcat start
body: <p>My project (which runs on jdk1.8.0_152 and apache-tomcat-8.5.24) was using asm3.1 jar . I changed it to asm6.0. Now on tomcat start I am getting </p>
  
  <blockquote>
    <p>java.lang.IllegalArgumentException</p>
  </blockquote>
  
  <p>How can I fix this?</p>
  
  <blockquote>
    <p>java.lang.IllegalArgumentException    at
    jersey.repackaged.org.objectweb.asm.ClassReader.(ClassReader.java:170)
      at
    jersey.repackaged.org.objectweb.asm.ClassReader.(ClassReader.java:153)
      at
    jersey.repackaged.org.objectweb.asm.ClassReader.(ClassReader.java:424)
      at
    com.sun.jersey.spi.scanning.AnnotationScannerListener.onProcess(AnnotationScannerListener.java:138)
      at
    com.sun.jersey.core.spi.scanning.JarFileScanner.scan(JarFileScanner.java:97)
      at
    com.sun.jersey.spi.scanning.servlet.WebAppResourcesScanner$1.f(WebAppResourcesScanner.java:94)
      at com.sun.jersey.core.util.Closing.f(Closing.java:71)</p>
  </blockquote>
  
  <p>Classpath </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;classpath&gt;
      &lt;classpathentry kind="src" path="modules/app"/&gt;
      &lt;classpathentry kind="src" path="modules/domain"/&gt;
      &lt;classpathentry kind="src" path="temp/web/WEB-INF/lib"/&gt;
      &lt;classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/servlet-api.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/httpclient-4.5.3.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/httpcore-4.4.6.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/mysql-connector-java-5.1.37-bin.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/aws-java-sdk-1.11.138.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/mongo-2.10.1.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/json_simple-1.1.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/commons-beanutils-1.8.3.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/guava-14.0.1.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/jedis-2.8.0.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/commons-pool2-2.4.2.jar"/&gt;
      &lt;classpathentry kind="lib" path="buildconfig/gen/out"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/cglib-nodep-2.2.3.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/geocode.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/json-org.jar" sourcepath="modules/lib/json-org.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/eclipselink.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/poi-ooxml-schemas-3.7.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/jaxb-api.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/jaxb-core.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/jaxb-impl.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/jaxb-jxc.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/jaxb-xjc.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/gson-2.2.4.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/velocity-1.7.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/commons-lang-2.4.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/poi-3.10-beta2.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/mpxj.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/shiro-core-1.2.3.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/slf4j-api-1.7.6.jar"/&gt;
      &lt;classpathentry kind="lib" path="config/email/templates"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/shiro-ehcache-1.2.3.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/ehcache-2.8.1.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/quartz-2.2.1.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/jackson-annotations-2.8.8.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/jackson-databind-2.8.8.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/jackson-core-2.8.8.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/Rhino_1_7R4.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/poi-ooxml-3.9.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/xmlbeans-2.3.0.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/opencsv-2.3.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/BASE64Decoder.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/commons-net-3.3.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/mybatis-3.2.8.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/commons-math3-3.5.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/itextpdf-5.5.6.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/joda-time-2.8.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/jcommon-1.0.0.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/jfreechart-1.0.1.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/jsoup-1.8.3.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/diffutils-1.3.0.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/grammatica-1.5.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/mibble-mibs-2.9.3.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/mibble-parser-2.9.3.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/snmp6_0.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/concurrent-trees-2.4.0.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/thumbnailator-0.4.8.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/batik-all-1.7.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/xml-apis-ext-1.3.04.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/evo-inflector-1.0.1.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/xmlsec-1.3.0.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/sqlite-jdbc-3.7.2.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/jxl-2.6.12.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/sonar-ant-task-1.3.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/zip4j_1.3.2.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/commons-httpclient-3.1.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/google-api-client-1.22.0.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/google-api-client-servlet-1.22.0.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/google-api-services-drive-v2-rev268-1.22.0.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/google-http-client-1.22.0.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/google-http-client-jackson-1.22.0.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/google-oauth-client-1.22.0.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/google-oauth-client-java6-1.22.0.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/google-oauth-client-jetty-1.22.0.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/google-http-client-jackson2-1.22.0.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/cdi-api.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/javax.inject-1.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/javax.websocket-api-1.0-rc4.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/dropbox-core-sdk-3.0.3.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/google-api-services-drive-v3-rev71-1.22.0.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/org.mortbay.jetty.server_6.1.22.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/org.mortbay.jetty.util_6.1.22.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/elasticsearch-6.0.0.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/hppc-0.7.2.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/lang-mustache-client-6.0.0.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/log4j-api-2.9.1.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/log4j-core-2.9.1.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/lucene-core-7.0.1.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/lucene-highlighter-7.0.1.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/lucene-join-7.0.1.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/lucene-queries-7.0.1.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/lucene-queryparser-7.0.1.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/lucene-sandbox-7.0.1.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/netty-all-4.1.18.Final.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/parent-join-client-6.0.0.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/percolator-client-6.0.0.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/reindex-client-6.0.0.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/t-digest-3.2.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/transport-6.0.0.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/transport-netty4-client-6.0.0.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/custombuild.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/hibernate-c3p0-5.2.12.Final.jar"/&gt;
      &lt;classpathentry kind="lib" path="modules/lib/custombase.jar"/&gt;
      &lt;classpathentry kind="output" path="bin"/&gt;
  &lt;/classpath&gt;
  </code></pre>
  
  <p>custombase.jar,custombuild.jar these two are a set of other jars. custombase.jar has all these jars inside that</p>
  
  <pre><code>            &lt;zipfileset src="lib/dom4j-1.6.1.jar"/&gt;
              &lt;zipfileset src="lib/commons/commons-codec-1.10.jar"/&gt;
              &lt;zipfileset src="lib/commons/commons-collections-3.1.jar"/&gt;
              &lt;zipfileset src="lib/commons/commons-fileupload-1.2.2.jar"/&gt;
              &lt;zipfileset src="lib/commons/commons-io-2.4.jar"/&gt;
              &lt;zipfileset src="lib/commons/commons-lang3-3.1.jar"/&gt;
              &lt;zipfileset src="lib/commons/js.jar"/&gt;
              &lt;zipfileset src="lib/commons/gson-2.2.2.jar"/&gt;
              &lt;zipfileset src="lib/hibernate/antlr-2.7.7.jar"/&gt;
              &lt;zipfileset src="lib/hibernate/hibernate-commons-annotations-4.0.1.Final.jar"/&gt;
              &lt;zipfileset src="lib/hibernate/hibernate-core-4.1.9.Final.jar"/&gt;
              &lt;zipfileset src="lib/hibernate/hibernate-jpa-2.0-api-1.0.1.Final.jar"/&gt;
              &lt;zipfileset src="lib/hibernate/javassist-3.17.1-GA.jar"/&gt;
              &lt;zipfileset src="lib/hibernate/jboss-logging-3.1.0.GA.jar"/&gt;
              &lt;zipfileset src="lib/hibernate/jboss-transaction-api_1.1_spec-1.0.0.Final.jar"/&gt;
              &lt;zipfileset src="lib/hibernate/c3p0-0.9.2-pre5.jar"/&gt;
              &lt;zipfileset src="lib/hibernate/hibernate-c3p0-4.1.9.Final.jar"/&gt;
              &lt;zipfileset src="lib/hibernate/mysql-connector-java-5.1.13-bin.jar"/&gt;
              &lt;zipfileset src="lib/hibernate/mchange-commons-java-0.2.3.jar"/&gt;
  
              &lt;zipfileset src="lib/jersey/jersey-bundle-1.19.4.jar"/&gt;
              &lt;zipfileset src="lib/jersey/asm-6.0.jar"/&gt;
              &lt;zipfileset src="lib/jersey/jackson-mini-1.9.9.jar"/&gt;
  
              &lt;zipfileset src="lib/javamail/mail.jar"/&gt;
              &lt;zipfileset src="lib/javamail/mailapi.jar"/&gt;
              &lt;zipfileset src="lib/javamail/imap.jar"/&gt;
              &lt;zipfileset src="lib/javamail/smtp.jar"/&gt;
              &lt;zipfileset src="lib/javamail/pop3.jar"/&gt;
              &lt;zipfileset src="lib/javamail/dsn.jar"/&gt;
  
              &lt;zipfileset src="lib/logback/logback-access-1.0.9.jar"/&gt;
              &lt;zipfileset src="lib/logback/logback-classic-1.0.9.jar"/&gt;
              &lt;zipfileset src="lib/logback/logback-core-1.0.9.jar"/&gt;
              &lt;zipfileset src="lib/logback/slf4j-api-1.7.2.jar"/&gt;
  
              &lt;zipfileset src="lib/logging/commons-logging-1.1.1.jar"/&gt;
              &lt;zipfileset src="lib/logging/commons-logging-adapters-1.1.1.jar"/&gt;
              &lt;zipfileset src="lib/logging/commons-logging-api-1.1.1.jar"/&gt;
  
              &lt;zipfileset src="lib/http/fluent-hc-4.2.2.jar"/&gt;
              &lt;zipfileset src="lib/http/httpclient-4.2.2.jar"/&gt;
              &lt;zipfileset src="lib/http/httpclient-cache-4.2.2.jar"/&gt;
              &lt;zipfileset src="lib/http/httpcore-4.2.2.jar"/&gt;
              &lt;zipfileset src="lib/http/httpmime-4.2.2.jar"/&gt;
  </code></pre>