Announcement Announcement Module
No announcement yet.
Memory leak problem with Spring app in tomcat Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Memory leak problem with Spring app in tomcat

    I'm deploying a very simple spring-based test app to my tomcat container. However, the WebappClassLoader never gets garbage collected, because tomcat objects (loaded by the StandardClassLoader) have hard references to the classes of my app.

    I've figured out / fixed a couple of these problems. For example if you have the xerces lib in your app, and not in tomcat's server/lib, the container will create instances of your app's xml parser.

    At the moment I'm looking at this nasty link of references:

    StandardClassLoader ->
    org.apache.tomcat.util.IntrospectionUtils.objectMe thods ->
    Hashtable [30].key ->
    org.springframework.beans.factory.BeanDefinitionSt oreException.

    Unlike the beans introspector, the tomcat IntrospectionUtils has no 'flushCache' method. Any suggestions for how I get around this without making changes in IntrospectionUtils?


  • #2
    There was a blog some time ago about memory leaks with webapps ( However, I guess you already read that one. I think you should see the tomcat-dev lists about this topic; for sure they have some good advices on how to release the memory.

    P.S. it would be really nice if you can post your finding/recipes on WIKI or at least in a blog or smth [/url]


    • #3
      Here are a few past threads on the subject of webapp memory leaks...
      Last edited by robyn; May 14th, 2006, 08:15 PM.


      • #4
        I created a wiki page about this problem:

        Feel free to correct or add information.