We are currently using Apache Tomcat 7.0.50 deployed with multiple web application instances and where we are trying to fix some of the Bugs in the catalina.out which appears severe. Two of those are as below.
org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks SEVERE: The web application [/app_name] created a ThreadLocal with key of type [class name] (value [class name]) and a value of type [classname] (value [classname@4b188d84]) 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.
org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc SEVERE: The web application [/app_name] registered the JDBC driver [oracle.jdbc.driver.OracleDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
We have really seen many solutions to these errors above in various communities, blogs and FAQ sessions, but are trying to find
Why are these happening to be precise?
Are these considered severe and needs to be fixed , for sure?
How can we resolve , or work around these with some Apache Tomcat configurations? We have tried many in context.xml, web.xml, server.xml etc, but couldn't succeed.
In the worst case, if at any case these can be hidden from catalina.out, how can we do that?
Kindly help us here. Any help would be appreciated and accepted. Thanks in advance.
Note: For iten 2, I have found a solution as mentioned in Oracle driver memory leak - Tomcat but have not given it a try. Will that really work for Tomcat 7.0.50?
Regards, Sam Mohan.