Bug #62170 failed to unregister [com.mysql.jdbc.Driver] when stop tomcat posible memory lea
Submitted: 15 Aug 2011 1:04 Modified: 16 Aug 2011 6:36
Reporter: Pedro Figueira Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / J Severity:S5 (Performance)
Version:5.1.17 OS:Windows (Apache Tomcat/6.0.32)
Assigned to: CPU Architecture:Any
Tags: Is actually a problem of pool.

[15 Aug 2011 1:04] Pedro Figueira
Description:
Hellow

I use Spring 3.0.5, hibernate 3.5.6-Final and c3p0 0.9.1.2.

I already switched connection pool and also have tried to change his version of spring and hibernate.

Which leads me to believe that the bug is in version connectorj.

This is the error that appears in the tomcat.

15/Ago/2011 1:50:08 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [/ test] registered the JDBC driver [com.mysql.jdbc.Driver] but it failed to unregister When the web application was stopped. To Prevent a memory leak, the JDBC Driver Has Been forcibly unregistered.

I have also to change l'adresse version of tomcat, but still the same.

Apparently should be solved with version 5.1.17, but not this.

How to repeat:
Booting from tomcat 6.0.24 and 6.0.32 combo set of pooled conection c3p0 with hibernate-3.5.6 Final using annotations and put the datasource connection connetorj.
[15 Aug 2011 13:42] Mark Matthews
JDBC drivers no nothing about Tomcat's lifecycle, therefore they can not know when they may be "unregistered", so this is not a bug in Connector/J. You'll have to either use a connection pool that has been wired into Tomcat's context lifecycle listening framework, or use com.mysql.jdbc.NonRegisteringDriver as the driver you pass to connection pools.
[16 Aug 2011 6:36] Pedro Figueira
Thank you for the quick response. 

It is the pool that does not unregister.

Again, thank you