This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Tomcat and the fly likes tomcat - their classes from previous runs are still loaded in memory Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "tomcat - their classes from previous runs are still loaded in memory" Watch "tomcat - their classes from previous runs are still loaded in memory" New topic
Author

tomcat - their classes from previous runs are still loaded in memory

amir taghvayi
Ranch Hand

Joined: Sep 16, 2011
Posts: 54
hi

when stop my project , tomcat say :

The following web applications were stopped (reloaded, undeployed), but their classes from previous runs are still
loaded in memory, thus causing a memory leak (use a profiler to confirm) .

Where we find that Which classes are left in memory ?

please help me .
ali farozi
Greenhorn

Joined: May 23, 2012
Posts: 6
hi amir

You can run jmap -histo which will show you loaded classes.

Another way is to enable classloading debug information and do some scripting to detect what is left loaded.
amir taghvayi
Ranch Hand

Joined: Sep 16, 2011
Posts: 54
hi ali

jmap help is :jmap -histo <pid> .

what is <pid> ? what is jmap command line for web-app in tomcat ?

Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19654
    
  18

Please keep an eye on this thread.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
ahsan hemati
Greenhorn

Joined: May 27, 2012
Posts: 2
hi

Do the following steps:
1- get pid with jps command for example -->  pid: 2512 org.apache.catalina.startup.Bootstrap start
2- run jmap -histo 2512

show the classes remain in memory . and you can use of jconsole for tracing your project .
amir taghvayi
Ranch Hand

Joined: Sep 16, 2011
Posts: 54
thank you , i get list of classes are still loaded in memory .

Why my class remain in memory ?What is the problem of class ?
 
Don't get me started about those stupid light bulbs.
 
subject: tomcat - their classes from previous runs are still loaded in memory
 
Similar Threads
How to find memory leaks in a Tomcat servlet?
Tomcat crashes with Out of Memory Error!
Regrading JSP's
Why is this happening?
Form submission using huge amounts of memory!