title: Error Deploying a WAR file in tomcat 7.0.50
body: <p>I had previously deployed a WAR file in tomcat installed on my local computer and it worked really fine. I am deploying the same WAR file on tomcat installed in my windows 2003 server and i get the following error. Below is my logfile.</p>
  
  <pre><code>INFO: Deploying web application archive C:\ProgramFiles\ApacheSoftwareFoundatio\Tomcat 7.0\webapps\xxxxxxx.war
  Sep 17, 2014 9:40:33 AM org.apache.catalina.startup.ContextConfig beforeStart
  SEVERE: Exception fixing docBase for context [/dstvNickGateway]
  java.io.FileNotFoundException: C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\dstvNickGateway.war (The process cannot access the file because it is being used by another process)
  at java.util.zip.ZipFile.open(Native Method)
  at java.util.zip.ZipFile.&lt;init&gt;(Unknown Source)
  at java.util.zip.ZipFile.&lt;init&gt;(Unknown Source)
  at java.util.jar.JarFile.&lt;init&gt;(Unknown Source)
  at java.util.jar.JarFile.&lt;init&gt;(Unknown Source)
  at sun.net.www.protocol.jar.URLJarFile.&lt;init&gt;(Unknown Source)
  at sun.net.www.protocol.jar.URLJarFile.getJarFile(Unknown Source)
  at sun.net.www.protocol.jar.JarFileFactory.get(Unknown Source)
  at sun.net.www.protocol.jar.JarURLConnection.connect(Unknown Source)
  at sun.net.www.protocol.jar.JarURLConnection.getJarFile(Unknown Source)
  at org.apache.catalina.startup.ExpandWar.expand(ExpandWar.java:111)
  at org.apache.catalina.startup.ContextConfig.fixDocBase(ContextConfig.java:719)
  at org.apache.catalina.startup.ContextConfig.beforeStart(ContextConfig.java:847)
  at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:373)
  at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
  at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
  at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402)
  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
  at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
  at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
  at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
  at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1073)
  at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1857)
  at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
  at java.util.concurrent.FutureTask.run(Unknown Source)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
  at java.lang.Thread.run(Unknown Source)
  
  Sep 17, 2014 9:40:33 AM org.apache.catalina.core.StandardContext resourcesStart
  SEVERE: Error starting static Resources
  java.lang.IllegalArgumentException: Invalid or unreadable WAR file : C:\Program  Files\Apache Software Foundation\Tomcat 7.0\webapps\dstvNickGateway.war (The process    cannot access the file because it is being used by another process)
  at org.apache.naming.resources.WARDirContext.setDocBase(WARDirContext.java:136)
  at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:5089)
  at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5269)
  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
  at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
  at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
  at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
  at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1073)
  at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1857)
  at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
  at java.util.concurrent.FutureTask.run(Unknown Source)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
  at java.lang.Thread.run(Unknown Source)
  
  Sep 17, 2014 9:40:33 AM org.apache.catalina.core.ContainerBase addChildInternal
  SEVERE: ContainerBase.addChild: start: 
  org.apache.catalina.LifecycleException: Failed to start component  [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/xxxxxx]]
  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
  at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
  at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
  at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
  at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1073)
  at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1857)
  at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
  at java.util.concurrent.FutureTask.run(Unknown Source)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
  at java.lang.Thread.run(Unknown Source)
  Caused by: org.apache.catalina.LifecycleException: Error in resourceStart()
  at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5270)
  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
  ... 10 more
  
  Sep 17, 2014 9:40:33 AM org.apache.catalina.startup.HostConfig deployWAR
  SEVERE: Error deploying web application archive C:\Program Files\Apache Software   Foundation\Tomcat 7.0\webapps\dstvNickGateway.war
  java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/dstvNickGateway]]
  at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:904)
  at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
  at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
  at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1073)
  at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1857)
  at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
  at java.util.concurrent.FutureTask.run(Unknown Source)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
  at java.lang.Thread.run(Unknown Source)
  </code></pre>