You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2015/11/18 14:54:07 UTC

[Bug 58625] New: Failed to detect war change

https://bz.apache.org/bugzilla/show_bug.cgi?id=58625

            Bug ID: 58625
           Summary: Failed to detect war change
           Product: Tomcat 8
           Version: 8.0.28
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
          Assignee: dev@tomcat.apache.org
          Reporter: loic.oudot@gmail.com

In the case where the war is not completly expanded in the work directory, the
code introduce by the commit
http://svn.apache.org/viewvc?view=revision&revision=1663784 doesn't catch the
case where the file 'war_tracker' is not present and do not re-expand the war
file accordingly.

We can see the code in org.apache.catalina.startup.ExpandWar.java:

        // Check to see of the WAR has been expanded previously
        if (docBase.exists()) {
            // A WAR was expanded. Tomcat will have set the last modified
            // time of warTracker file to the last modified time of the WAR so
            // changes to the WAR while Tomcat is stopped can be detected
            if (!warTracker.exists() || warTracker.lastModified() ==
warLastModified) {
                // No (detectable) changes to the WAR
                success = true;
                return (docBase.getAbsolutePath());
            }

The test should be more thinner :
if (warTracker.exists() && warTracker.lastModified() == warLastModified) {
                // No (detectable) changes to the WAR
                success = true;
                return (docBase.getAbsolutePath());
}

I don't catch when this use case appear exactly, but I face this problem one or
two times a day.

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

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


[Bug 58625] Failed to detect war change

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58625

--- Comment #1 from loic.oudot@gmail.com ---
there is duplicate code in org.apache.catalina.startup.HostConfig :
        if (xml.exists() && unpackWARs &&
                (!warTracker.exists() || warTracker.lastModified() ==
war.lastModified())) {
            useXml = true;
        }

the same pacth might be included also:
        if (xml.exists() && unpackWARs &&
                (warTracker.exists() && warTracker.lastModified() ==
war.lastModified())) {
            useXml = true;
        }

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

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


[Bug 58625] Failed to detect war change

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58625

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |WONTFIX

--- Comment #2 from Mark Thomas <ma...@apache.org> ---
Sorry, we aren't going to be making that change. If a user upgrades from a
Tomcat version without this feature to a Tomcat version with this feature it is
going to trigger removal of the expanded dir and re-expansion of the WAR. That
is unexpected and is likely to cause problems for some users.

If you can identify exactly what is going wrong in your use case then we can
take another look to see if we can handle that specific case.

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

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


[Bug 58625] Failed to detect war change

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58625

loic.oudot@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All
                 CC|                            |loic.oudot@gmail.com

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

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