Announcement Announcement Module
Collapse
No announcement yet.
Installation: ThreadLocal forcefully removed Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Installation: ThreadLocal forcefully removed

    Hi,

    I'm trying to set up a Spring app on Tomcat 6/Spring 3/Ubuntu 8.04. After sucessfully running the website yesterday, today I see these errors when restarting Tomcat:

    PHP Code:
    INFOStopping service Catalina
    Feb 4
    2010 9:43:33 AM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
    SEVERE
    A web application created a ThreadLocal with key of type [org.springframework.core.NamedThreadLocal] (value [Prototype beans currently in creation]) and a value of type [null] (value [null]) but failed to remove it when the web application was stoppedTo prevent a memory leakthe ThreadLocal has been forcibly removed.
    Feb 42010 9:43:33 AM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap

    SEVERE
    A web application created a ThreadLocal with key of type [org.springframework.core.NamedThreadLocal] (value [Transactional resources]) and a value of type [null] (value [null]) but failed to remove it when the web application was stoppedTo prevent a memory leakthe ThreadLocal has been forcibly removed
    Not sure what it means or why it occurs.

    Any ideas?

    Marc

  • #2
    I have upgraded tomcat to 6.0.24 and I get the same error everytime I stop tomcat. No changes made to the app since I was using 6.0.20.

    The Spring version I use is 2.5.6.SEC01. Can someone please advise why is this happening and whether it is serious enough as to not proceed with a deployment on tomcat 6.0.24?

    Thanks you,
    George

    Comment


    • #3
      The new Tomcat 6 adds a series of listeners to prevent against memory leaks and one of them, is against ThreadLocals. Unfortunately, there's no public API to deliberately remove ThreadLocals which rely on garbage collection. This is not something that affects only Spring but _all_ applications that create a ThreadLocal.

      I've raised this with some of the Tomcat committeers who are looking into this.

      Anyway, the messages are harmless and the runtime should not be affected by it.

      Comment


      • #4
        Thank you Costin!

        Comment


        • #5
          Although this post is pretty old but I had similar issues and wanted to post solution.
          Check your version of jars against the tomcat. We had this problem when we switched from 6.0.14 to 6.0.26

          Here is the solution posted
          http://www.skill-guru.com/blog/2010/...cibly-removed/

          Comment


          • #6
            hi

            Anyway, the messages are harmless and the runtime should not be affected by it.
            Thank you
            tito

            Comment


            • #7
              Not Harmless

              Disclaimer: The last time I tried this was about 3 years ago.

              tito 1, I disagree with the assertion that this is harmless. With the configuration provided by georgea, Tomcat will start the application just fine. A hot-redeploy, however, will result in an error state that leaves the application stopped until Tomcat is restarted.

              While not a major issue in most cases, this bug can cause a problem. That said, it appears that a fix is available as vinay076 points out.

              In general, a SEVERE message should not be harmless. If it is, than it should be logged, at worst, as WARN. This, in and of itself, would be a bug. I recognize that this thread has more to do with Tomcat than with Spring, but it should be considered a compatibility issue.

              Comment


              • #8
                Hey vinay thanks for the link. It is very useful. Keep sharing buddy

                Comment


                • #9
                  Originally posted by dgreenbean View Post
                  Disclaimer: The last time I tried this was about 3 years ago.

                  tito 1, I disagree with the assertion that this is harmless. With the configuration provided by georgea, Tomcat will start the application just fine. A hot-redeploy, however, will result in an error state that leaves the application stopped until Tomcat is restarted.

                  While not a major issue in most cases, this bug can cause a problem. That said, it appears that a fix is available as vinay076 points out.

                  In general, a SEVERE message should not be harmless. If it is, than it should be logged, at worst, as WARN. This, in and of itself, would be a bug. I recognize that this thread has more to do with Tomcat than with Spring, but it should be considered a compatibility issue.
                  Thank you to make sure that when the search words are true indeed greetings.

                  Comment


                  • #10
                    Originally posted by dgreenbean View Post
                    Disclaimer: The last time I tried this was about 3 years ago.

                    tito 1, I disagree with the assertion that this is harmless. With the configuration provided by georgea, Tomcat will start the application just fine. A hot-redeploy, however, will result in an error state that leaves the application stopped until Tomcat is restarted.

                    While not a major issue in most cases, this bug can cause a problem. That said, it appears that a fix is available as vinay076 points out.

                    In general, a SEVERE message should not be harmless. If it is, than it should be logged, at worst, as WARN. This, in and of itself, would be a bug. I recognize that this thread has more to do with Tomcat than with Spring, but it should be considered a compatibility issue.
                    Thank you to make sure that when the search words are true indeed greetings.

                    Comment

                    Working...
                    X