tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mott Leroy <m...@acadaca.com>
Subject Avoiding deploying an application twice
Date Mon, 02 May 2005 17:21:33 GMT
I wasn't able to find this particular error when I did a search, so I 
thought I'd post here in case someone has a similar problem.

I was having an error when remotely deploying an application (tomcat 
5.0.28) using the tomcat manager (via Ant tasks). I did not explicitly 
define a context.xml file for the application and used a more or less 
"out of the box" standard host configuration.

The tomcat error would say during deployment:

May 2, 2005 11:13:51 AM org.apache.catalina.startup.HostConfig deployWARs
WARNING: Exception while expanding web application archive appname.war
May 2, 2005 11:14:01 AM org.apache.catalina.startup.HostConfig deployWARs
WARNING: Exception while expanding web application archive appname.war

[And repeat ...]

That was all the information it would give.

I believe this error resulted from tomcat attempting to deploy/unpack 
the application twice.

When I set autoDeploy="false" on the host (as opposed to the default 
behavior, which is true), the errors disappeared.

The relevant section of the documentation is below:

http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/host.html#Automatic%20Application%20Deployment

"When using automatic deployment, the |docBase| defined by an XML 
Context 
<http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/context.html> 
file should be outside of the |appBase| directory. If this is not the 
case difficulties may be experienced deploying the web application or 
the application may be deployed twice.

Finally, note that if you are defining contexts explicitly, you should 
probably turn off automatic application deployment. Otherwise, your 
context will be deployed twice each, and that may cause problems for 
your app."

I did not define an explicit context, but I guess the implicit context 
(or generated context) defaults to a docbase inside the appbase 
directory, which results in the behavior described above.




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message