Bug 34006 - Undeploy of webapps with antiResourceLocking in META-INF\context.xml fails after Tomcat restart
Summary: Undeploy of webapps with antiResourceLocking in META-INF\context.xml fails af...
Status: CLOSED FIXED
Alias: None
Product: Tomcat 5
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 5.5.7
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-14 11:54 UTC by Ben Spiller
Modified: 2006-06-11 18:04 UTC (History)
0 users



Attachments
Example .war that cannot be undeployed after deployment and a Tomcat restart (1.50 KB, application/octet-stream)
2005-03-14 11:56 UTC, Ben Spiller
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Spiller 2005-03-14 11:54:02 UTC
We have a webapp that needs to be dynamically redeployed on Windows, so we
turned the antiResourceLocking option on in a context.xml file in its META-INF
directory. Deployment/undeployment from a clean Tomcat works fine. However after
stopping the Tomcat service and starting it again, we find that although the
webapp is autoDeploy-ed correctly on startup (and unpacked into the \temp\
directory), it cannot be undeployed. The manager webapp reports a successful
undeploy and there is no error message in any of the Tomcat logs; however the
Manager's application list still includes the webapp, which appears to have been
stopped but not undeployed.

This behaviour seems to be the same whether or not antiResourceLocking is turned
on globally. However if we either i) set antiResourceLocking=true in the global
conf\context.xml file and remove the entire context.xml file from the webapp or
ii) set antiResourceLocking=false in the webapp context.xml file, undeployment
succeeds. (NB: unfortunately this does not provide a workaround for us, as we
need antiResourceLocking=false globally to make other webapps work correctly)

To demonstrate that this is a Tomcat problem and not specific to our apps, I
have reproduced it using only the Manager webapp for the deploy/undeploy
operations, with a stripped down webapp containing only a single JSP page,
web.xml and the context.xml file. I'll upload this example .war shortly.

I suspect the problem is related to the context files stored in the
conf\enginename\host folder, as I note that deleting the webapp's context file
from this folder seems to allow the undeployment to work correctly (whether it
is deleted before or after starting Tomcat for the second time).
Comment 1 Ben Spiller 2005-03-14 11:56:29 UTC
Created attachment 14485 [details]
Example .war that cannot be undeployed after deployment and a Tomcat restart
Comment 2 Remy Maucherat 2005-03-14 12:55:18 UTC
Ok, using antiResourceLocking (which modifies the docBase) caused a bad
registration of the resources.