  | Mailing List | | Home | | Forum Home | | JBoss - Java Application Server | | Struts - A MVC web framework | | Tomcat - JSP/Servlet container | | iText - An open source PDF Java Library | | JDOM - JDOM XML Parser | | J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition | | J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog | | Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology | | JSP - A mailing list about Java Server Pages specification and reference | |
Struts & Hibernate
|
|
|
  | | Re: WebappClassLoader not GC 'd after webapp reload (Tomcat 4.1.24,
5.0.18) | Re: WebappClassLoader not GC 'd after webapp reload (Tomcat 4.1.24,
5.0.18) 2004-01-29 - By Remy Maucherat
Back Tatyana Apine wrote: > Hi all, > > I've got a problem and was wondering if you ever experienced something > like this. > > 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 java.security.ProtectionDomain 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 - > http://mirrors.isc.org/pub/apache/jakarta/struts/binaries/jakarta-struts-1 (See http://uts-1.ora-code.com).1 .zip > ) - 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.
I answered your bug report. To summarize, I think this cannot be fixed (there are many other situations where the classloader will be leaked, and Tomcat cannot do anything about it, so you cannot rely on having no memory leaks when reloading a webapp in the general case).
So well, good luck in the evaluation of other app servers, since it was yet another one of these nice "fix this or else" emails ;)
-- xxxxxxxxxxxxxxxxxxxxxxxxx R�my Maucherat Developer & Consultant JBoss Group (Europe) S�RL xxxxxxxxxxxxxxxxxxxxxxxxx
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected) For additional commands, e-mail: tomcat-user-help@(protected)
|
|
 |