• Community
  • Products
  • Jira Software
  • Questions
  • SEVERE: The web application [] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@53dafbaf]) and a value of type [org.dom4j.DocumentFactory] (value [org.dom4j.DocumentFactory@4dc1c92b]) but failed to remove it whe

SEVERE: The web application [] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@53dafbaf]) and a value of type [org.dom4j.DocumentFactory] (value [org.dom4j.DocumentFactory@4dc1c92b]) but failed to remove it whe

Yoga Reddy {Appfire}
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 23, 2016
 

2 answers

1 vote
crf
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 24, 2016

Short answer: This error message is coming from Tomcat and you probably don't need to worry about it unless you see it while developing a P2 plugin or find that JIRA won't actually shut down when asked and you're having to kill the process.

Long answer:

Like other servlet containers, Tomcat has mechanisms for managing what applications are deployed to it with the intention that you might change this on the fly.  For example, you could have a single tomcat instance with both JIRA and Confluence served by it, then add Crowd to that already running servlet container.

In practice, it is very hard to make that idea work, and the lack of operating system level isolation between the applications in the container means that an outage for one could easily take out the others, so Atlassian applications normally deploy as all-in-one standalone distributions with a Tomcat instance all to themselves, and we don't recommend changing that.

As a result, we don't actually deploy JIRA or any other application in a manner where it would matter if a thread local isn't removed by JIRA shutting down, because if you are shutting down JIRA then you are shutting down Tomcat, too, so the "leak" is not going to matter.  However, the warning could be a symptom of two other related problems that you might see:

  1. During a P2 plugin's upgrade or a full system import, a plugin can be asked to shut itself down, and any threads it has spawned should be cleaned up as part of this.  If that plugin fails to shut down all of its spawned threads, that can lead to memory leaks and unstable behaviour when the plugin is upgraded on a live system.
  2. A plugin that has failed to clean up its threads might also prevent the shutdown from completing at all if the threads still look "active" and were not created as "daemon" threads.

So if you are a developer of a P2 plugin and your own plugin seems to be involved, you should investigate.  Try doing 5 imports in a row and check what threads are running.  Always name the threads you spawn to make it easier to identify their source if they cause any trouble.

If none of that applies to you and you aren't experiencing any trouble shutting JIRA down gracefully, you should most likely ignore the message.

1 vote
Justin Leader [HyperVelocity] July 23, 2016

Could you elaborate a little more on what the problem is?

Suggest an answer

Log in or Sign up to answer