Overall, the reason for these alarms is from tomcat 6.0.24, there is a new function called memory leak protection. Refer to http://wiki.apache.org/tomcat/MemoryLeakProtection. This is a good function to make our applications and server better. And there is some suggestion in this web page. Include 'JDBC driver registration' problem.
The tomcat version below 6.0.24 does not alarm these memory leak problems, but the problem is exist. (I’ve tried tomcat 6.0.20).
For JDBC driver registration problem.
SEVERE: The web application [/xxx] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered. Pls refer to http://bugs.mysql.com/bug.php?id=62170.
This is not regard as a bug(whatever, it has been forcibly unregistered already), we can unregister the driver by extends the lifecycle listener of spring framework. Such as org.springframework.web.context.ContextLoaderListener.
For mysql connector 其他问题
When we are using mysql connector version 5.0.5 (mysql-connector-java-5.0.5.jar):
MySql Bug 1: The web application [/xxx] appears to have started a thread named [MySQL Statement Cancellation Timer] but has failed to stop it. This is very likely to create a memory leak.
This bug was reported at version 5.1.6 and already been fixed already in the future version of MySql. Refer to http://bugs.mysql.com/bug.php?id=36565.
When we are using mysql connector version 5.1.22 (mysql-connector-java-5.1.22.jar):
MySql Bug 2: SEVERE: The web application [/xxx] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak.
This bug was reported at version 5.1.21 and its status is ‘IN PROGRESS’, it means it’s not fixed yet. Refer to http://bugs.mysql.com/bug.php?id=65909.
So I’m using the mysql connector 5.1.20 (mysql-connector-java-5.1.20.jar), everything looks good.