一次bug调试经验----To prevent a memory leak, the JDBC Driver has been forcibly unregistered.

5-Feb-2019 11:03:11.635 严重 [RMI TCP Connection(2)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal Context [] startup failed due to previous errors
15-Feb-2019 11:03:11.743 警告 [RMI TCP Connection(2)-127.0.0.1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc 
The web application [ROOT] registered the JDBC driver [com.alibaba.druid.proxy.DruidDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
15-Feb-2019 11:03:11.744 警告 [RMI TCP Connection(2)-127.0.0.1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [ROOT] 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.

在一个老项目的交接过程中,出现了这个问题,刚开始一直奔着是内存泄漏,jdbc驱动实例无法销毁(因为项目里面有定时任务,显示的调用了sqlsessionfactory,但是是mybaitis项目)的原因。后来才发觉是,jdbc的驱动的ip不对,给的是错误的,更换了之后就OK了。这就是一次明显的XY问题。

你可能感兴趣的:(java)