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 2012/03/08 22:18:01 UTC

DO NOT REPLY [Bug 52861] New: WebappClassLoader stopped too early in webapp shutdown cycle

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


DO NOT REPLY [Bug 52861] WebappClassLoader stopped too early in webapp shutdown cycle

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

--- Comment #1 from Nathan Bryant <nr...@plusgrade.com> 2012-03-08 21:27:57 UTC ---
See also http://java.net/jira/browse/GLASSFISH-16712

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


DO NOT REPLY [Bug 52861] WebappClassLoader stopped too early in webapp shutdown cycle

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

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

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

--- Comment #2 from Mark Thomas <ma...@apache.org> 2012-03-08 21:39:57 UTC ---
This looks like a configuration problem with ENABLE_CLEAR_REFERENCES although
since you haven't provided the full stack trace it is hard to be sure.

The users list is the place to seek help with this until that discussion
reaches the point where it is determined that there is actually a Tomcat bug
here.

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