Hi Chris,

I already took off the JARs from the shared/lib directory. So that is not an 
issue now.
I have just stopped my apps, and this is what I have found in my log:


Nov 18, 2010 10:22:57 PM org.apache.catalina.core.StandardWrapper unload
INFO: Waiting for 1 instance(s) to be deallocated
Nov 18, 2010 10:22:58 PM org.apache.catalina.loader.WebappClassLoader 
clearReferencesJdbc
SEVERE: The web application [] registered the JBDC driver 
[com.mysql.jdbc.Driver] but failed to unregister it when the web application 
was stopped. To prevent a memory leak, the JDBC Driver has been forcibly 
unregistered.
Nov 18, 2010 10:22:58 PM org.apache.catalina.loader.WebappClassLoader 
clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [MySQL 
Statement Cancellation Timer] but has failed to stop it. This is very likely to 
create a memory leak.
Nov 18, 2010 10:22:58 PM org.apache.catalina.loader.WebappClassLoader 
clearThreadLocalMap
SEVERE: The web application [] created a ThreadLocal with key of type 
[org.apache.commons.lang.builder.ReflectionToStringBuilder$1] (value 
[org.apache.commons.lang.builder.reflectiontostringbuilde...@1794040]) and a 
value of type [java.util.HashSet] (value [[]]) but failed to remove it when the 
web application was stopped. This is very likely to create a memory leak.



> -----Original Message-----
> From: Christopher Schultz [mailto:ch...@christopherschultz.net]
> Sent: Tuesday, November 16, 2010 02:34 PM
> To: Tomcat Users List
> Subject: Re: After manager says that there was a leak, how to use a profiler?
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Brian,
> 
> On 11/16/2010 10:42 AM, Brian wrote:
> > If I choose
> > the report of "Paths from GC roots" from it, I see LOTS of items! And
> > all of them have the "<loader> of" indication. All the items are
> > classes programmed by me, so I guess I'm guilty, and not the people
> > that programmed Tomcat
> > ;-)  . They are DTOs, facades, Struts actionforms, etc.
> > Why are all these classes in the list?
> 
> If these are java.lang.Class objects, then you are looking at the list of 
> classes
> loaded by the WebappClassLoader. These are the objects that make up the
> memory block that is unrecoverable. It's not the Class objects themselves that
> are holding onto references to the ClassLoader, it's the other way around.
> 
> > What should I check about them? Why are they still loaded?
> 
> The real problem is that there is an object that is still "live"
> somewhere whose Class has been loaded by your webapp's
> WebappClassLoader.
> 
> > I guess there is something missing in my programming. Maybe I should
> > do something about all the objects that are still alive that
> > correspond to all the loaded classes? Maybe I need to do something in the
> "contextDestroyed()"
> > method in the ServletContextListener in my app, in order to destroy
> > all the objects properly?
> 
> A basic rule is that anything you configure in a ServletContextListener's
> contextStarted method needs to be destroyed in the contextDestroyed
> method. Same thing for any Servlets that have
> init() methods -- use the destroy() method to clean-up those resources.
> 
> When you undeploy, there may be a "leak" message in catalina.out. If you
> post that, we might be able to help you.
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to