You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Steve <sc...@nsi-ltd.demon.co.uk> on 2007/06/10 23:01:05 UTC
WAR Deployment on virtual hosts, not under webapps
I am tryimg to get autodeploymenf of WAR files working for virtual hosts located outside the standard Tomcat directory structure.
I am using Tomcat 6.0.13 and running behind Apache 2.2 using mod-rewrite. This is enabling both static and servlet content to be co-located under the same directory structure for the given virtual host. No problems encountered there.
However, when I try an drop a WAR file into the appbase for a virtual host, nothing appears to happen. Even though I have got <unpackWARs> and <autoDeploy> both set as true.
If I drop the same WAR file into $TOMCAT_BASE/webapps, the WAR file is expanded after a few seconds and the application directory is unpacked and available for use. Deleting the WAR file also results in successful undeployment.
Looking into the Tomcat log file, I get two error messages.
INFO: Deploying web application archive myWarFile.war
Jun 10, 2007 8:37:44 PM org.apache.catalina.startup.ContextConfig init
SEVERE: Exception fixing docBase: {0}
java.io.FileNotFoundException: /var/www/vhosts/host_appBase/myWarFile/META-INF/MANIFEST.MF (No such file or directory)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
at org.apache.catalina.startup.ExpandWar.expand(ExpandWar.java:312)
at org.apache.catalina.startup.ExpandWar.expand(ExpandWar.java:158)
at org.apache.catalina.startup.ContextConfig.fixDocBase(ContextConfig.java:890)
at org.apache.catalina.startup.ContextConfig.init(ContextConfig.java:1008)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:279)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.StandardContext.init(StandardContext.java:5297)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4070)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:714)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1206)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
at java.lang.Thread.run(Thread.java:595)
Any suggesions or advice would be appreciated.