tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 47343] New: Fails re-deploying, when we update context.xml.
Date Wed, 10 Jun 2009 10:54:22 GMT

           Summary: Fails re-deploying, when we update context.xml.
           Product: Tomcat 6
           Version: 6.0.20
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina

When context.xml of the conf/<engine>/<host>directory is updated, docBase
directory is deleted and fails re-deploying. 

(The context name is assumed to be testWebapp. )
1.<<Tomcat_home>>/webapps/testWebapp/META-INF/context.xml is prepared.
2.Context.xml is not put under the conf/<engine>/<host> directory.
  (means first deployed)

3.Tomcat is started. (testWebapp.xml is created to the conf/<engine>/<host>
directory. )

4.testWebapp.xml of conf/<engine>/<host > is updated. 

<<Tomcat_home>>/webapps/testWebapp directory is deleted. 

The cause is in the fixed of
The order of the resource added to
HostConfig$DeployedApplication#redeployResources was changed by this fix. 

order of the redploy resources is as follows. 
[before fix]
 Case of Deploy war.
   war -> context.xml(conf/<engine>/<host>) -> doceBase directory
 Case of Deploy directory.
   doceBase directory -> context.xml(META-INF/context.xml)
[after fix]
 Case of Deploy war.
   context.xml(conf/<engine>/<host>) -> war -> doceBase directory
 Case of Deploy directory.
   context.xml(META-INF/context.xml) -> doceBase directory

HostConfig#checkResources is as follows. 
for (int i = 0; i < resources.length; i++) {
if ((!resource.isDirectory()) && resource.lastModified() > lastModified) {
   // Delete other redeploy resources
   for (int j = i + 1; j < resources.length; j++) {
       try {
           File current = new File(resources[j]);
       } catch (IOException e) {
                   ("hostConfig.canonicalizing",, e);

After all,
When testWebapp.xml of conf/<engine>/<host > is updated, 
directory is deleted or war and the directory are deleted. 
As a result,
It fails in deploying because it tries to deploy it only with context.xml
(docBase direcotry doesn't exist). 


Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message