title: Failed to process JAR found at URL [jar:file:bcprov-jdk15-1.46.jar!/] for ServletContainerInitializers for context
body: <p>I have a seven web applications developed in Spring 3.2, all annotation based. I am using Hibernate 4.2 as my ORM framework. </p>
  
  <p>I create a tomcat image with all the seven wars packed inside and use the same for deployment on Amazon EC2.</p>
  
  <p>For last couple of days I have been encountering the below error message almost at every deployment:</p>
  
  <pre><code>WARNING: Failed to scan JAR [file:/opt/progress/CloudServices/server/webapps/cs-    
  account/WEB-INF/lib/bcprov-jdk15-1.46.jar] from WEB-INF/lib
  java.util.zip.ZipException: error in opening zip file
  at java.util.zip.ZipFile.open(Native Method)
  at java.util.zip.ZipFile.&lt;init&gt;(ZipFile.java:127)
  at java.util.jar.JarFile.&lt;init&gt;(JarFile.java:135)
  at java.util.jar.JarFile.&lt;init&gt;(JarFile.java:72)
  at sun.net.www.protocol.jar.URLJarFile.&lt;init&gt;(URLJarFile.java:72)
  at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:48)
  at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:70)
  at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:104)
  at sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection.java:71)
  at org.apache.tomcat.util.scan.FileUrlJar.&lt;init&gt;(FileUrlJar.java:41)
  at org.apache.tomcat.util.scan.JarFactory.newInstance(JarFactory.java:34)
  at org.apache.catalina.startup.ContextConfig$FragmentJarScannerCallback.scan(ContextConfig.java:2566)
  at org.apache.tomcat.util.scan.StandardJarScanner.process(StandardJarScanner.java:241)
  at org.apache.tomcat.util.scan.StandardJarScanner.scan(StandardJarScanner.java:166)
  at org.apache.catalina.startup.ContextConfig.processJarsForWebFragments(ContextConfig.java:1864)
  at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1211)
  at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:855)
  at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:345)
  at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
  at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
  at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5161)
  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
  at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
  at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
  at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
  at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:962)
  at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1603)
  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
  at java.util.concurrent.FutureTask.run(FutureTask.java:138)
  at    
  java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
  at java.lang.Thread.run(Thread.java:662)
  </code></pre>
  
  <p><strong>Note</strong> This was working fine earlier, the current code base might have added on or two more classes.</p>
  
  <p>Not able to understand the exact problem. Any help would be really appreciated.</p>
  
  <p><strong>Update</strong></p>
  
  <p>When I increase the memory allocated to the JVM, this works fine every time.
  Also, if I delete the exploded war of the project which failed to deploy and re-copy the war at the webapps directory of tomcat, it works well.</p>