javaspringtomcatjawrjscompress

The web application created a ThreadLocal, but failed to remove it Tomcat [SEVERE]


I am getting below error on tomcat console and leading to outof memoryerror.

16-Mar-2015 10:57:25.659 SEVERE [http-nio-8080-exec-6] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [XXXX] created a ThreadLocal with key of type [net.jawr.web.context.ThreadLocalJawrContext$1] (value [net.jawr.web.context.ThreadLocalJawrContext$1@7c709f7a]) and a value of type [net.jawr.web.context.JawrContext] (value [net.jawr.web.context.JawrContext@45f64269]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.

we are using net.jawr dependecy for compressing js and css files. please suggest for this. thanks in advance.


Solution

  • This is a bug in jawr.

    It is already fixed in V3.5 (release 1st January 2014)

    release notes:

    Issue #198 fixed: Memory leak when restarting server due to missing reset of a ThreadLocal