tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 52861] New: WebappClassLoader stopped too early in webapp shutdown cycle
Date Thu, 08 Mar 2012 21:18:01 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=52861

             Bug #: 52861
           Summary: WebappClassLoader stopped too early in webapp shutdown
                    cycle
           Product: Tomcat 6
           Version: 6.0.29
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: nrb@plusgrade.com
    Classification: Unclassified


I have a webapp that fails on shutdown in the following code block from Spring
Framework's AbstractApplicationContext (spring-context-3.0.6.jar,
AbstractApplicationContext.java line 1013:)

// Stop all Lifecycle beans, to avoid delays during individual destruction.
try {
    getLifecycleProcessor().onClose();
}
catch (Throwable ex) {
    logger.warn("Exception thrown from LifecycleProcessor on context close",
ex);
}

What is happening is that the catch block is reached for whatever reason, and
then the call to "logger.warn()" fails with the following exception if the
webapp has not loaded these classes prior to being shut down:

SEVERE: Servlet X threw unload() exception
javax.servlet.ServletException: Servlet.destroy() for servlet offers threw
exception
[snip]
Caused by: java.lang.NoClassDefFoundError:
org/apache/log4j/spi/ThrowableInformation

I see the WebappClassloader implements Lifecycle and provides start()/stop()
methods and I assume that it has been stopped prior to invoking the web app's
shutdown listeners. If that is the case, it seems like this is the wrong order
for those two operations.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


Mime
View raw message