title: How to avoid NullPointerException in WebappClassLoader.findResources?
body: <p>When redeploying a specific webapp by using the manager-app, the next call causes a 'NullPointerException' because of WebappClassLoader.findResources (Stacktrace below). After restarting the tomcat the app will running smooth.</p>
  
  <p>Looking all over the web, the problem seems to be a very common, but without a concrete solution. For me it's only caused when deploying one specific webapp. Related to some mailinglists it could be a jar (e.g. axis.jar) which is include in shared/libs/ but not should be in /WEB-INF/libs/</p>
  
  <p>For building and deploying the webapp I use maven and it works fine for all other apps, but this one. There are no differences in the projekt configuration of this project and the other ones.</p>
  
  <p>May there are some things I could do to find the reason why the tomcat "crashs"?! Someone have any ideas resolving this issue?!</p>
  
  <pre><code>java.lang.NullPointerException
      at org.apache.catalina.loader.WebappClassLoader.findResources(WebappClassLoader.java:1245)
      at java.lang.ClassLoader.getResources(ClassLoader.java:1041)
      at org.apache.commons.discovery.jdk.JDK12Hooks.getResources(JDK12Hooks.java:150)
      at org.apache.commons.discovery.resource.DiscoverResources$1.getNextResources(DiscoverResources.java:153)
      at org.apache.commons.discovery.resource.DiscoverResources$1.getNextResource(DiscoverResources.java:129)
      at org.apache.commons.discovery.resource.DiscoverResources$1.hasNext(DiscoverResources.java:116)
      at org.apache.commons.discovery.resource.names.DiscoverNamesInFile$1.getNextClassNames(DiscoverNamesInFile.java:186)
      at org.apache.commons.discovery.resource.names.DiscoverNamesInFile$1.getNextClassName(DiscoverNamesInFile.java:170)
      at org.apache.commons.discovery.resource.names.DiscoverNamesInFile$1.hasNext(DiscoverNamesInFile.java:157)
      at org.apache.commons.discovery.resource.names.NameDiscoverers$1.getNextIterator(NameDiscoverers.java:143)
      at org.apache.commons.discovery.resource.names.NameDiscoverers$1.hasNext(NameDiscoverers.java:126)
      at org.apache.commons.discovery.resource.classes.ResourceClassDiscoverImpl$1.getNextResource(ResourceClassDiscoverImpl.java:159)
      at org.apache.commons.discovery.resource.classes.ResourceClassDiscoverImpl$1.hasNext(ResourceClassDiscoverImpl.java:147)
      at org.apache.axis.configuration.EngineConfigurationFactoryFinder$1.run(EngineConfigurationFactoryFinder.java:120)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.apache.axis.configuration.EngineConfigurationFactoryFinder.newFactory(EngineConfigurationFactoryFinder.java:113)
      at org.apache.axis.configuration.EngineConfigurationFactoryFinder.newFactory(EngineConfigurationFactoryFinder.java:160)
      at org.apache.axis.client.Service.getEngineConfiguration(Service.java:813)
      at org.apache.axis.client.Service.getAxisClient(Service.java:104)
      at org.apache.axis.client.Service.&lt;init&gt;(Service.java:113)
  </code></pre>