title: java.util.zip.ZipException: error in opening zip file
body: <p>i am geting this strange exception below:</p>
  
  <pre><code>INFO: Deploying web application archive ZangV3Spring.war
  10-Sep-2010 08:46:38 org.apache.catalina.startup.ContextConfig init
  SEVERE: Exception fixing docBase for context [/ZangV3Spring] 
  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:114)
      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:80)
      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.catalina.startup.ExpandWar.expand(ExpandWar.java:110)
      at org.apache.catalina.startup.ContextConfig.fixDocBase(ContextConfig.java:709)
      at org.apache.catalina.startup.ContextConfig.init(ContextConfig.java:838)
      at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:331)
      at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
      at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:89)
      at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:312)
      at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:292)
      at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:100)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:129)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:785)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:763)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:558)
      at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:987)
      at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:778)
      at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:540)
      at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1458)
      at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:338)
      at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
      at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:89)
      at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1186)
      at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1340)
      at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1349)
      at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1329)
      at java.lang.Thread.run(Thread.java:619)
  10-Sep-2010 08:46:38 org.apache.catalina.core.StandardContext resourcesStart
  SEVERE: Error starting static Resources
  java.lang.IllegalArgumentException: Invalid or unreadable WAR file : error in opening zip file
      at org.apache.naming.resources.WARDirContext.setDocBase(WARDirContext.java:141)
      at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4432)
      at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4582)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:785)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:763)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:558)
      at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:987)
      at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:778)
      at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:540)
      at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1458)
      at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:338)
      at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
      at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:89)
      at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1186)
      at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1340)
      at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1349)
      at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1329)
      at java.lang.Thread.run(Thread.java:619)
  </code></pre>
  
  <p>If i remove this bean from my xml it will build and deploy fine:</p>
  
  <pre><code>&lt;bean id="sessionFactory"
          class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"&gt;
          &lt;property name="dataSource" ref="dataSource"&gt;&lt;/property&gt;
      &lt;/bean&gt;
  </code></pre>
  
  <p>The rest of my xml content is this:</p>
  
  <pre><code>&lt;beans xmlns="http://www.springframework.org/schema/beans"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jee="http://www.springframework.org/schema/jee"
      xsi:schemaLocation="http://www.springframework.org/schema/beans
         http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
         http://www.springframework.org/schema/jee
         http://www.springframework.org/schema/jee/spring-jee-2.0.xsd"&gt;
  
      &lt;!-- http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-2.0.xsd --&gt;
  
      &lt;!-- Config properties files --&gt;
  
  
  
      &lt;!-- Hibernate database stuff --&gt;
  
  
      &lt;bean id="fileDownload" class="com.kc.models.FileManipulator"&gt;&lt;/bean&gt;
  
      &lt;bean id="propertyConfigurer"
          class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"&gt;
          &lt;property name="locations"&gt;
              &lt;list&gt;
                  &lt;value&gt;properties/jdbc.properties&lt;/value&gt;
              &lt;/list&gt;
          &lt;/property&gt;
      &lt;/bean&gt;
  
  
      &lt;bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"&gt;
          &lt;property name="driverClassName" value="${database.driver}" /&gt;
          &lt;property name="url" value="${database.url}" /&gt;
          &lt;property name="username" value="${database.user}" /&gt;
          &lt;property name="password" value="${database.password}" /&gt;
          &lt;property name="maxActive" value="${database.maxConnections}" /&gt;
      &lt;/bean&gt;
  
      &lt;bean id="sessionFactory"
          class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"&gt;
          &lt;property name="dataSource" ref="dataSource"&gt;&lt;/property&gt;
      &lt;/bean&gt;
  
  
  
      &lt;!--
  
      &lt;bean id="hibernateTemplate" class="org.springframework.orm.hibernate3.HibernateTemplate"&gt;
          &lt;property name="sessionsFactory" ref="sessionFactory"&gt;&lt;/property&gt;
      &lt;/bean&gt;
  
  
       --&gt;
  &lt;/beans&gt;
  </code></pre>