亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

Tomcat報錯: JDBC unregister 解決辦法

 更新時間:2017年05月12日 10:17:38   投稿:lqh  
這篇文章主要介紹了Tomcat報錯: JDBC unregister 解決辦法的相關(guān)資料,需要的朋友可以參考下

 Tomcat報錯: JDBC unregister 解決辦法

摘要: The web application [web application] registered the JDBC driver [net.sourceforge.jtds.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.

tomcat6關(guān)閉時觸發(fā)日志提示:

The web application [web application] registered the JDBC driver [net.sourceforge.jtds.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.

原因是tomcat6最新版本引入內(nèi)存溢出檢測阻止機制,檢測到j(luò)dbc在tomcat運行時進行注冊,但是當(dāng)tomcat停止時沒有解除注冊。

有兩個方法可以解決這個問題:

    1、顯式的解除注冊

// Example: DriverManager.getDriver("jdbc:mysql://localhost:3306");
java.sql.Driver mySqlDriver = DriverManager.getDriver("YOUR DRIVER");
DriverManager.deregisterDriver(mySqlDriver);

    2、使用tomcat jdbc連接池,并將jdbc驅(qū)動包拷貝至tomcat的lib下,由tomcat自己進行管理。

  感謝閱讀,希望能幫助到大家,謝謝大家對本站的支持!

相關(guān)文章

最新評論