tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tatyana Apine" <>
Subject WebappClassLoader not GC'd after webapp reload (Tomcat 4.1.24, 5.0.18)
Date Thu, 29 Jan 2004 02:41:07 GMT
Hi all,

I've got a problem and was wondering if you ever experienced something like 

My webapplication is using Struts(1.1) and Log4J (1.2.7). I run it on tomcat 
4.1.24 (I also tried 5.0.18 and got the same behavior).

I use OptimizeIt (version 4.2) to see what classes weren't garbage collected 
after I stop or reload my webapplication. I noticed that 
org.apache.catalina.loader.WebappClassLoader is not removed after I 
stop/reload my webapplication. Every time I restart my application, the new 
WebappClassLoader is added to the list of WebappClassLoaders instances - and 
they never get garbage collected.

I debugged this class and the class that is referencing this class loader 
(org.apache.catalina.loader.WebappLoader) and made sure that all references 
to this class from the WebappLoader are removed. OptimizeIt is showing that 
"incoming refernces" after application stop for the WebappClassLoader class 
are and sun.reflect.DelegatingClassLoader. 
This information does not help me too much :(

I also made sure that all Threads that are started when I start the 
application are stopped after I stop it (and all Thread instances are GC'd 
as well).

I can reproduce the same problem with struts-blank application from the 
apache web site (it's inside the struts1.1 zip file - 
) - if I reload/stop this application the WebappClassLoader that was used by 
it is not GC'd.

I also tried using IBM JDK - and I have the same behavior with it (1.3.1).

I have no ideas on what else I can try, except trying another application 
server - but it will be a huge effort that I would like to avoid. Did you 
ever have the same thing happening? Do you have any ideas on what else I can 
try here? I will really appreciate any help on this problem.

Thank you,

Check out the new MSN 9 Dial-up  fast & reliable Internet access with prime 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message