DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5364>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5364 Can't re-deploy a web application with the manager Summary: Can't re-deploy a web application with the manager Product: Tomcat 4 Version: 4.0.1 Final Platform: PC OS/Version: Linux Status: NEW Severity: Major Priority: Other Component: Unknown AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] OS is Redhat 7.1. (Included is a note from craigmcc below so please read the whole description) Start the tomcat server with an unexpanded web application war file (we'll call it bobo.war for this example) in webapps. The tomcat server will expand it and add a context as it should. Remove the bobo.war file and its expanded directory from webapps. Put the same bobo.war file into webapps, then first remove the context through the manager, then install it again, through the manager, i.e... call: http://172.16.3.245/manager/remove?path=/bobo http://172.16.3.245/manager/install?path=/bobo&war=jar:file:/www/tomcat/jakarta- tomcat-4.0.1/webapps/bobo.war!/ This *should* work the first time and report no errors. Do it again: Remove the bobo.war file and its expanded directory from webapps. Put the same bobo.war file into webapps, then first remove the context through the manager, then install it again, through the manager, i.e... call: http://172.16.3.245/manager/remove?path=/bobo http://172.16.3.245/manager/install?path=/bobo&war=jar:file:/www/tomcat/jakarta- tomcat-4.0.1/webapps/bobo.war!/ The install command will return with FAIL - Encountered exception java.lang.IllegalStateException: zip file closed I noticed this note from craigmcc while searching the web: -------------------------------------------------------------------------- craigmcc 00/10/04 18:31:06 Modified: catalina/src/share/org/apache/catalina/core StandardHost.java Log: Add a FIXME note. The JarURLConnection mechanism seems to cache instances of JarFile -- even after you close them! This prevents you from undeploying an application, replacing the JAR file, and redeploying the application :-(. I cannot seem to find a workaround for this at the moment. Revision Changes Path 1.4 +15 -6 jakarta-tomcat- 4.0/catalina/src/share/org/apache/catalina/core/StandardHost.java ... - jarFile.close(); + jarFile.close(); // FIXME - doesn't remove from cache!!! -------------------------------------------------------------------------- In the tomcat 4.0.1 final source package, I see that the line with the FIXME comment is still there. The issue he describes... "This prevents you from undeploying an application, replacing the JAR file, and redeploying the application" ...is the issue I am having. Thanks! -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>