Announcement Announcement Module
No announcement yet.
Spring Data Repository causes Server Tomcat error on shut down - how to prevent? Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring Data Repository causes Server Tomcat error on shut down - how to prevent?

    My tomcat app is issuing this error on shut down. The message refers to my use of Spring Data Repository "findBy". Why are these occurring and how can I get ride of them?

    SEVERE: The web application [] created a ThreadLocal with key of type [org.springframework.core.NamedThreadLocal] (value [Transactional resources]) and a value of type [java.util.HashMap] (value [{public abstract java.util.List[email protected], public abstract java.util.List[email protected], public abstract java.lang.Object[email protected]}]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
    Environment includes:
    - Tomcat 7.0.22
    - STS 3.0.0
    - Roo 1.2

  • #2
    Although the message level might indicate otherwise it is nothing more than a warning issued by the memory-leak detection in Tomcat. So it is not really an error just an indication that something might be better off being cleaned up but.


    • #3
      Ok, thanks.

      What would a better cleanup look like?


      • #4
        Nothing that you can do (unless you would create your own ServletContextListener and implement the contextDestroyed method (maybe an ApplicationListener can also work) which cleans up after Spring Data. However this is probably something the Spring Data team has to do.

        I just wanted to indicate that it is not something you should worry or panic about (when deploying to another server you will not see this).


        • #5
          Great, thanks for the advice