I have a very simple 'Hello world' type web application (Spring 3.2.1, Hibernate 4.1.9) on stopping/restarting the web-app Tomcat 7.0.26
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):
/myapp
I took the following steps: Started JVisualVM Right click on Tomcat and selected 'Heap Dump' Clicked on 'OQL Console' on the [heapdump] Ran this query:
select x from org.apache.catalina.loader.WebappClassLoader x
Found 4 instances of:
org.apache.catalina.loader.WebappClassLoader
Selected one whose "started" field was "false" Right clicked on the "this" reference and clicked "Show Nearest GC Root" A dialog saying "No GC root found" is shown.
What am I missing? any help will be greatly appreciated. Thanks.