您的位置:首页 > 运维架构 > Tomcat

TOMCAT加载多应用webAppRootKey配置

2016-10-20 11:58 316 查看
TOMCAT7 启动报错,应用启动失败

严重: The web application [/gzgicn] 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.

2016-10-19 14:23:38 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc

由于TOMCAT7加载了多个应用,经过排查,终于找到原因是

<context-param>
<param-name>webAppRootKey</param-name>
<param-value>gzgicn.webapp.root</param-value>
</context-param>

不同的应用的\WEB-INF\web.xml 配置的webAppRootKey值不能相同

"gzgicn.webapp.root"这个字符串可以随便写任何字符串。如果不配置默认值是"webapp.root"。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: