tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 37498] [PATCH] NPE in org.apache.catalina.core.ContainerBase.removeChild
Date Fri, 02 Jan 2009 14:04:39 GMT

Mark Thomas <> changed:

           What    |Removed                     |Added
  Attachment #17908|0                           |1
        is obsolete|                            |

--- Comment #17 from Mark Thomas <>  2009-01-02 06:04:37 PST ---
Created an attachment (id=23069)
 --> (
Proposed patch

I have been reviewing this issue and it appears that the original bug report is
actually multiple inter-related issues. Using a later version where a number of
these have been fixed makes this a lot easier to get one's head around.

The original test case is still valid but the log4j jar should be replaced with
the latest version as the version included appears to suffer from jar locking
when used on later Tomcat versions.

The remaining issue is that the undeploy is triggered by deleting the exploded
directory. When the logging mechanism tries to load the additional classes it
requires it can't since the JAR has been deleted. The exception this causes
means that the context is not correctly cleaned up. This also causes issues for
subsequent re-deployments.

Undeployment via the manager does not experience this issue since in this
scenario the jars are not deleted until later in the process.

A temporary work-around may be to use the context listener to ensure the
class(es) required by the logger during shutdown is loaded (I haven't tested

I do not believe the proposed two line patch is correct since it would redirect
logging to Tomcat in cases where this is not necessary. I have attached an
alternative patch which I will propose for inclusion in 5.5.x.

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