1. 程式人生 > >tomcat中部署多個專案時遇到問題

tomcat中部署多個專案時遇到問題

SEVERE: Error listenerStart
2017-2-27 16:24:48 org.apache.catalina.core.StandardContext start
SEVERE: Context [/JYZX2] startup failed due to previous errors
2017-2-27 16:24:48 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [/JYZX2] registered the JDBC driver [com.ibm.db2.jcc.DB2Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
2017-2-27 16:24:48 org.apache.coyote.http11.Http11AprProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8181
2017-2-27 16:24:48 org.apache.coyote.ajp.AjpAprProtocol start
INFO: Starting Coyote AJP/1.3 on ajp-8009
2017-2-27 16:24:48 org.apache.catalina.startup.Catalina start
INFO: Server startup in 3514 ms
2017-2-27 16:24:52 org.apache.coyote.http11.Http11AprProtocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8181
2017-2-27 16:24:52 org.apache.coyote.ajp.AjpAprProtocol pause
INFO: Pausing Coyote AJP/1.3 on ajp-8009
2017-2-27 16:24:53 org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
2017-2-27 16:24:53 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [/JYZX] registered the JDBC driver [com.ibm.db2.jcc.DB2Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
2017-2-27 16:24:53 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/JYZX] appears to have started a thread named [Resource Destroyer in BasicResourcePool.close()] but has failed to stop it. This is very likely to create a memory leak.
2017-2-27 16:24:53 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/JYZX] appears to have started a thread named [FileWatchdog] but has failed to stop it. This is very likely to create a memory leak.
2017-2-27 16:24:53 org.apache.coyote.http11.Http11AprProtocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8181

總結:我們在查詢錯誤時,需要找到引起錯誤的根本,好像在上面的提示中,我們可以知道根本的原因是Error listenerStart,這個錯誤我們可以在web.xml中的listener節點中尋找錯誤;上面的錯誤的原因是:

 <context-param>
    <param-name>webAppRootKey</param-name>
    <param-value>javass.webapp.root</param-value>
  </context-param>
  <listener>
    <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
  </listener>
在tomcat中的多個專案配置相同的log4j屬性 webAppRootKey,這個tomcat中這個必須是不一樣的,否則就會啟動不成功