Christopher Brown created XMLBEANS-502:

             Summary: Usage of XmlBeans triggers "clearThreadLocalMap" warnings 
in Tomcat with XSSF
                 Key: XMLBEANS-502
             Project: XMLBeans
          Issue Type: Bug
    Affects Versions:  Version 2.3
         Environment: Apache Tomcat 6.0.35, Apache POI 3.9-20121203, Java SE 
6/7, any operating system
            Reporter: Christopher Brown


After creating this issue I was advised to 
create the issue here.  This appears to be similar to but as it's marked as FIXED 
and as I'm using a more recent version (and as it's not completely identical), 
I'm creating a new issue.

It would appear that XMLBeans is creating (and not clearing) ThreadLocal 
variables.  This causes Tomcat to complain about classloader leaks (see 
messages below).  Based on information in XMLBEANS-103, I have tried to coax 
the JVM to clear the ThreadLocal (by performing garbage collection on the JVM), 
but that doesn't clear the ThreadLocals, even if allowing time to elapse AFTER 
using POI to process an XSSF document and BEFORE stopping Tomcat.

To workaround this, we're having to impose long downtime when a restart is 
required.  Perhaps a utility class within XMLBeans could be made available with 
the POI distribution such as:


...that I could call from a "finally" block after processing the XSSF document?

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to