• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

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

 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 .
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi ali

jmap help is :jmap -histo <pid> .

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

 
Sheriff
Posts: 21760
102
Eclipse IDE Spring VI Editor Chrome Java Ubuntu Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please keep an eye on this thread.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you , i get list of classes are still loaded in memory .

Why my class remain in memory ?What is the problem of class ?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!