tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 52861] New: WebappClassLoader stopped too early in webapp shutdown cycle
Date Thu, 08 Mar 2012 21:18:01 GMT

             Bug #: 52861
           Summary: WebappClassLoader stopped too early in webapp shutdown
           Product: Tomcat 6
           Version: 6.0.29
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
    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, line 1013:)

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

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
Caused by: java.lang.NoClassDefFoundError:

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:
------- 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