Java Mailing List Archive

http://www.junlu.com/

Google
Google
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
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Oracle Connection Pooling in 3 2 2
Servlet : Session invalidate
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Tomcat and webapplication specific java library path
Running a Simple JMS Example
Mapping in workers2 properties
org apache jasper JasperException
Cannot find message resources under key org apache struts action
   MESSAGE
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
url string for connecting jboss to oracle
Value attribute of <html:checkbox
javax servlet ServletException: BeanUtils populate
HTTP Status 404 The requested resource is not available
5 0 18: Windows XP Pro vs Windows 2000
 
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 Source code of 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 Source code of 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 Source code of 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)




©2008 junlu.com - Jax Systems, LLC, U.S.A.