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.
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
I h
I have created issue: https://issues.apache.org/jira/browse/XMLBEANS-502
handled by xmlbeans directly