title: Tomcat website deployment error
body: <p>I have a tomcat website (octane generated) which I am trying to deploy on a devo box. The website loads up fine on my desktop. But when deploying on devo, it gives the following error in catalina.out log file :</p>
  
  <p>WARNING: Error while removing context []</p>
  
  <pre><code>java.lang.NullPointerException
          at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:915)
          at org.apache.catalina.startup.HostConfig.undeployApps(HostConfig.java:1319)
          at org.apache.catalina.startup.HostConfig.stop(HostConfig.java:1290)
          at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:323)
          at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
          at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1086)
          at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1098)
          at org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:450)
          at org.apache.catalina.core.StandardService.stop(StandardService.java:587)
          at org.apache.catalina.core.StandardServer.stop(StandardServer.java:744)
          at org.apache.catalina.startup.Catalina.stop(Catalina.java:648)
          at org.apache.catalina.startup.Catalina$CatalinaShutdownHook.run(Catalina.java:692)
  
  Aug 4, 2011 12:06:31 AM org.apache.catalina.startup.HostConfig undeployApps
  WARNING: Error while removing context [/LiveWatchJvmPublisherWebapp]
  
  java.lang.NullPointerException
          at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:915)
          at org.apache.catalina.startup.HostConfig.undeployApps(HostConfig.java:1319)
          at org.apache.catalina.startup.HostConfig.stop(HostConfig.java:1290)
          at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:323)
          at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
          at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1086)
          at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1098)
          at org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:450)
          at org.apache.catalina.core.StandardService.stop(StandardService.java:587)
          at org.apache.catalina.core.StandardServer.stop(StandardServer.java:744)
          at org.apache.catalina.startup.Catalina.stop(Catalina.java:648)
          at 
  
  org.apache.catalina.startup.Catalina$CatalinaShutdownHook.run(Catalina.java:692)
  
  Aug 4, 2011 12:06:56 AM org.apache.catalina.startup.HostConfig deployDirectory
  INFO: Deploying web application directory ROOT
  Aug 4, 2011 12:06:56 AM org.apache.catalina.startup.HostConfig deployDirectory
  SEVERE: Error deploying web application directory ROOT
  java.io.FileNotFoundException: /local/apollo/var/env/SCoMMockClientWebsite/tomcat/conf/Catalina/localhost/ROOT.xml (No such file or directory)
  
      at java.io.FileOutputStream.open(Native Method)
      at java.io.FileOutputStream.&lt;init&gt;(FileOutputStream.java:194)
      at java.io.FileOutputStream.&lt;init&gt;(FileOutputStream.java:145)
      at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1013)
      at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:964)
      at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)
      at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
      at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
      at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
      at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
      at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
      at org.apache.catalina.core.StandardService.start(StandardService.java:519)
      at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
      at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
      at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
      Aug 4, 2011 12:06:56 AM org.apache.coyote.http11.Http11Protocol start
      INFO: Starting Coyote HTTP/1.1 on http-3080
      Aug 4, 2011 12:06:56 AM org.apache.coyote.http11.Http11Protocol start
      INFO: Starting Coyote HTTP/1.1 on http-3043
      Aug 4, 2011 12:06:56 AM org.apache.catalina.startup.Catalina start
      INFO: Server startup in 245 ms
  </code></pre>
  
  <p>It looks similar to this error <a href="http://www.coderanch.com/t/86776/Tomcat/tomcat" rel="nofollow">http://www.coderanch.com/t/86776/Tomcat/tomcat</a>, but I could not find a resolution after some digging around.</p>
  
  <p>It would be great if you can throw some light on this, if it is a known issue.
  FYI, I have not made any changes to the server.xml, context.xml files and web.xml.</p>