tomcat8.x下放了兩個(gè)項(xiàng)目,不知道為什么啟動(dòng)的時(shí)候第一個(gè)可以啟動(dòng)起來(lái),第二個(gè)就總報(bào)錯(cuò)
30-Sep-2016 15:42:17.044 WARNING [localhost-startStop-1] org.apache.catalina.loa
der.WebappClassLoaderBase.clearReferencesJdbc The web application [xxx] registered the JDBC driver [com.alibaba.druid.proxy.DruidDriver] but faile
d to unregister it when the web application was stopped. To prevent a memory lea
k, the JDBC Driver has been forcibly unregistered.
30-Sep-2016 15:42:17.044 WARNING [localhost-startStop-1] org.apache.catalina.loa
der.WebappClassLoaderBase.clearReferencesJdbc The web application [xxx] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregiste
r it when the web application was stopped. To prevent a memory leak, the JDBC Dr
iver has been forcibly unregistered.
30-Sep-2016 15:49:40.242 WARNING [localhost-startStop-1] org.apache.catalina.loa
der.WebappClassLoaderBase.clearReferencesThreads The web application [xxx] appears to have started a thread named [Abandoned connection cleanup th
read] but has failed to stop it. This is very likely to create a memory leak. St
ack trace of thread:
java.lang.Object.wait(Native Method)
java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:143)
com.mysql.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupT
hread.java:43)
開始以為是第二個(gè)項(xiàng)目有問題,因?yàn)閱?dòng)的時(shí)候第一個(gè)啟動(dòng)完了,再啟動(dòng)第二個(gè)的時(shí)候報(bào)的,所以開始一直以為是第二個(gè)項(xiàng)目數(shù)據(jù)庫(kù)連接池有什么問題呢,一直在找第二個(gè)
本人的解決辦法,網(wǎng)上查了很多都說(shuō)的是把配置文件中的監(jiān)聽去掉,我都去了最后還是不行,其實(shí)只要看日志文件中的localhost.2015-10-27.log就能看到是什么問題了
最后發(fā)現(xiàn)原來(lái)是第一個(gè)項(xiàng)目中web.xml中有個(gè)參數(shù)配置有問題,修改之后兩個(gè)項(xiàng)目就順利都啟動(dòng)起來(lái)了
歡迎加入QQ群:104286694