Bug 55149

Summary: Usage of XmlBeans triggers "clearThreadLocalMap" warnings in Tomcat with XSSF
Product: POI Reporter: Christopher Brown <brown>
Component: XSSFAssignee: POI Developers List <dev>
Status: RESOLVED MOVED    
Severity: normal    
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Bug Depends on: 59268    
Bug Blocks:    

Description Christopher Brown 2013-06-26 22:58:59 UTC
When using POI 3.9 with Apache Tomcat 6, to load, manipulate and save XLSX worksheets, the following messages appear in catalina.out when stopping Tomcat using $CATALINA_HOME/bin/shutdown.sh --> this looks like a memory leak.

SEVERE: The web application [/foobar] created a ThreadLocal with key of type [org.apache.xmlbeans.XmlBeans$1] (value [org.apache.xmlbeans.XmlBeans$1@7d3aace]) and a value of type [java.lang.ref.SoftReference] (value [java.lang.ref.SoftReference@5972be65]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Jun 26, 2013 7:01:56 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [/foobar] created a ThreadLocal with key of type [org.apache.xmlbeans.impl.schema.SchemaTypeLoaderImpl$1] (value [org.apache.xmlbeans.impl.schema.SchemaTypeLoaderImpl$1@7c3206c3]) and a value of type [java.util.ArrayList] (value [[java.lang.ref.SoftReference@385a2be8]]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Jun 26, 2013 7:01:56 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [/foobar] created a ThreadLocal with key of type [org.apache.xmlbeans.impl.store.Locale$1] (value [org.apache.xmlbeans.impl.store.Locale$1@27f8a93f]) and a value of type [java.lang.ref.SoftReference] (value [java.lang.ref.SoftReference@362f7b99]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Jun 26, 2013 7:01:56 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [/foobar] created a ThreadLocal with key of type [org.apache.xmlbeans.impl.store.CharUtil$1] (value [org.apache.xmlbeans.impl.store.CharUtil$1@675b9599]) and a value of type [java.lang.ref.SoftReference] (value [java.lang.ref.SoftReference@2dbaa4d2]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Comment 1 Nick Burch 2013-06-27 00:14:30 UTC
This looks like it might well be a problem with Apache XMLBeans, on which POI is based. I'm minded to say you should ask them for help first, to see if they have any ideas about why the thread locals are being created
Comment 2 Christopher Brown 2013-06-27 07:28:00 UTC
I h
Comment 3 Christopher Brown 2013-06-27 07:28:37 UTC
I have created issue:
https://issues.apache.org/jira/browse/XMLBEANS-502
Comment 4 Dominik Stadler 2013-08-06 09:41:15 UTC
handled by xmlbeans directly