tomcat中部署多个项目时遇到问题

来源:互联网 发布:倩女幽魂for mac 编辑:程序博客网 时间:2024/06/04 20:11
SEVERE: Error listenerStart2017-2-27 16:24:48 org.apache.catalina.core.StandardContext startSEVERE: Context [/JYZX2] startup failed due to previous errors2017-2-27 16:24:48 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbcSEVERE: 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 startINFO: Starting Coyote HTTP/1.1 on http-81812017-2-27 16:24:48 org.apache.coyote.ajp.AjpAprProtocol startINFO: Starting Coyote AJP/1.3 on ajp-80092017-2-27 16:24:48 org.apache.catalina.startup.Catalina startINFO: Server startup in 3514 ms2017-2-27 16:24:52 org.apache.coyote.http11.Http11AprProtocol pauseINFO: Pausing Coyote HTTP/1.1 on http-81812017-2-27 16:24:52 org.apache.coyote.ajp.AjpAprProtocol pauseINFO: Pausing Coyote AJP/1.3 on ajp-80092017-2-27 16:24:53 org.apache.catalina.core.StandardService stopINFO: Stopping service Catalina2017-2-27 16:24:53 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbcSEVERE: 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 clearReferencesThreadsSEVERE: 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 clearReferencesThreadsSEVERE: 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 destroyINFO: 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中这个必须是不一样的,否则就会启动不成功


0 0