title: Strange java.lang.ArrayIndexOutOfBoundsException thrown on jetty startup
body: <p>Whenever I deploy jetty application I hit this issue. Looks like some <code>jar</code> or class is broken.</p>
  
  <ul>
  <li>Colleagues compiling exactly same code, doesn't hit the issue. Even if the deploy to the same computer. (we use <code>git</code> and <code>maven</code>)</li>
  <li>Deleting local maven repository <code>~/.m2</code> and rebuilding doesn't help.</li>
  <li>Can run same jetty app locally without any issues.</li>
  <li>My initial suspect was that some <code>jar</code> is broken. Tried <code>jar tvf $every_jar</code> and haven't found anything.</li>
  </ul>
  
  <p>Any ideas how can I debug this? Looks really mysterious and I suspect is that some file get corrupted.</p>
  
  <pre><code>Stack trace:
  2014-10-21 13:29:25.123:WARN:oejw.WebAppContext:Failed startup of context o.e.j.w.WebAppContext{/,file:/XYZ/},/XYZ/webapps/root
  javax.servlet.ServletException: jersey-serlvet
          at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:553)
          at org.eclipse.jetty.servlet.ServletHolder.doStart(ServletHolder.java:344)
          at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
          at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:791)
          at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:265)
          at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1242)
          at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:717)
          at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:494)
          at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
          at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:39)
          at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:186)
          at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:494)
          at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:141)
          at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:145)
          at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:56)
          at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:615)
          at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:540)
          at org.eclipse.jetty.util.Scanner.scan(Scanner.java:403)
          at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:337)
          at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
          at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:121)
          at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
          at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:555)
          at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:230)
          at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
          at org.eclipse.jetty.util.component.AggregateLifeCycle.doStart(AggregateLifeCycle.java:81)
          at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:58)
          at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:96)
          at org.eclipse.jetty.server.Server.doStart(Server.java:282)
          at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
          at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1274)
          at java.security.AccessController.doPrivileged(Native Method)
          at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1197)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:606)
          at org.eclipse.jetty.start.Main.invokeMain(Main.java:473)
          at org.eclipse.jetty.start.Main.start(Main.java:615)
          at org.eclipse.jetty.start.Main.main(Main.java:96)
  </code></pre>
  
  <p>followed by</p>
  
  <pre><code>Caused by:
  java.lang.ArrayIndexOutOfBoundsException: 6241
          at org.objectweb.asm.ClassReader.&lt;init&gt;(Unknown Source)
          at org.objectweb.asm.ClassReader.&lt;init&gt;(Unknown Source)
          at org.objectweb.asm.ClassReader.&lt;init&gt;(Unknown Source)
          at com.sun.jersey.spi.scanning.AnnotationScannerListener.onProcess(AnnotationScannerListener.java:133)
          at com.sun.jersey.core.spi.scanning.uri.FileSchemeScanner$1.f(FileSchemeScanner.java:86)
          at com.sun.jersey.core.util.Closing.f(Closing.java:71)
          at com.sun.jersey.core.spi.scanning.uri.FileSchemeScanner.scanDirectory(FileSchemeScanner.java:83)
          at com.sun.jersey.core.spi.scanning.uri.FileSchemeScanner.scanDirectory(FileSchemeScanner.java:80)
          at com.sun.jersey.core.spi.scanning.uri.FileSchemeScanner.scanDirectory(FileSchemeScanner.java:80)
          at com.sun.jersey.core.spi.scanning.uri.FileSchemeScanner.scan(FileSchemeScanner.java:71)
          at com.sun.jersey.core.spi.scanning.PackageNamesScanner.scan(PackageNamesScanner.java:223)
          at com.sun.jersey.core.spi.scanning.PackageNamesScanner.scan(PackageNamesScanner.java:139)
          at com.sun.jersey.api.core.ScanningResourceConfig.init(ScanningResourceConfig.java:80)
          at com.sun.jersey.api.core.PackagesResourceConfig.init(PackagesResourceConfig.java:104)
          at com.sun.jersey.api.core.PackagesResourceConfig.&lt;init&gt;(PackagesResourceConfig.java:78)
          at com.sun.jersey.api.core.PackagesResourceConfig.&lt;init&gt;(PackagesResourceConfig.java:89)
          at com.sun.jersey.spi.container.servlet.WebComponent.createResourceConfig(WebComponent.java:700)
  </code></pre>