Bug 32729 - Can deploy but not undeploy improperly configured webapps
Summary: Can deploy but not undeploy improperly configured webapps
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 5
Classification: Unclassified
Component: Unknown (show other bugs)
Version: 5.5.4
Hardware: Macintosh Mac OS X 10.3
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
: 32831 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-12-16 11:22 UTC by Cyrus Dolph
Modified: 2004-12-23 06:58 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Cyrus Dolph 2004-12-16 11:22:07 UTC
To reproduce: introduce a typo in the web-app/servlet-mapping/servlet-name element of a web.xml of 
a working app, so that a url-pattern is mapped to an undefined servlet.  Run "ant install".  Although 
Ant reports a successful build, there will be a number of exceptions reported in catalina.out (including 
"IllegalArgumentException: Servlet mapping specifies an unknown servlet name ..."), and the webapp 
won't work.  

Attempts to undeploy the broken web-app using "ant remove" or the HTML manager then fail, 
with complaints that the app hasn't been started ("LifecycleException").  The commands "ant install" and 
"ant reload" also fail, reporting that the "Application already exists at path ..." and "[app] has not been 
started", respectively.  It seems the only way out is to delete the webapp from the filesystem by 
hand.

I expect it should not be possible to partially deploy a webapp, even if it is misconfigured.  Either the 
deployTask should delete from webapps an app that couldn't be started, or the UndeployTask should 
allow such an app to be removed.

I am using Ant 1.6.2.  My build.xml and web.xml closely resemble the examples given in the 
documentation.
Comment 1 Remy Maucherat 2004-12-16 13:50:52 UTC
I'll look at it, but using deploy and undeploy. install and remove are
deprecated and unsupported.
Comment 2 Remy Maucherat 2004-12-16 17:05:18 UTC
undeploy had a defect in this case, so I fixed it.
remove will now simply call undeploy. install already calls deploy.
Comment 3 Remy Maucherat 2004-12-23 15:58:37 UTC
*** Bug 32831 has been marked as a duplicate of this bug. ***