registered the JBDC driver [com.mysql.jdbc.Driver] but failed to unregister it

org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
严重: The web application [/rdms] registered the JBDC 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.


         后来在网上搜了搜,还是有不少人说这个问题吧,感觉出这个问题的原因可能是多种多样,并不是某个固定原因吧。我就简单说说我搜到一个的情况,和我自己的这个问题的解决。
          有篇老外的文章http://confluence.atlassian.com/pages/viewpage.action?pageId=218275753
它里有提到个原因:

Causes

There is a ?memory leak detection feature introduced in Tomcat 6.0.25 that attempts to log objects that have failed to be Garbage Collected even though they been marked for removal. As the Tomcat and JVM is being shutdown, these messages are not applicable in this situation.

 

      大概就是说tomcat 6.025以后引入了内存泄露侦测,对于垃圾回收不能处理的对像,它就会做日志。
老外提出的办法是要么用旧版本的tomcat,要么就在tomcat的server.xml文件中,把
<!-- Prevent memory leaks due to use of particular java/javax APIs-->
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener"/>;

这个监听给关了。我试了把这个监听关了,就不会再报上面那个信息,但是这样子运行tomcat会不会有其他的问题,我就不得而知了。

 

你可能感兴趣的:(apache,jvm,tomcat,mysql,jdbc)