I am running a standard Jersey (JAX-RS), Spring, JPA, Hibernate, Oracle application on Tomcat.
Hot-redeploys to Tomcat 6.0.32 are causing classloader leaks which you can see with the Find Leaks button on the manager page.
Using jmap and Memory Analyzer Tool, I can see two objects that are keeping the classloader from gc'ing.
The first is that the Diagnosability MBean is not getting unregistered. That is easy to find and unregister.
The other is a ThreadLocal in oracle.sql.AnyDataFactory but as I have no code (and a static field for it is not available), I don't see how to clean that up.
Also the ThreadLocal reporting that Tomcat does doesn't find it which is odd.
Any thoughts? Are other people seeing this?
Hi, I realize this is an old thread, but I reached the exact same conclusion for a classloader leak in my app and I couldn't find any other solution. Did you?
I found the same two classes: oracle.jdbc.driver.OracleDiagnosabilityMBean and oracle.sql.AnyDataFactory
I guess moving the driver to the global lib folder will solve the redeploy problem but I always found more practical to have the driver in the war.