使用war包发布web项目 tomcat报错
前因:
在使用tomcat 发布web项目:
将项目打成war包,放入webapps目录(abc.war)。
启动tomcat ,使用 http://localhost:8080访问成功
http://localhost:8080/abc一直访问不了。
查看log:
发现:
org.apache.catalina.core.StandardContext.startInternal Context [/abc] startup failed due to previous errors
20-Dec-2017 00:50:06.262 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [abc] registered the JDBC driver [com.mysql.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.
20-Dec-2017 00:50:06.263 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [abc] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
java.lang.Object.wait(Native Method)
排查问题后,发现:
代码中的实体类跟数据库中的字段没对应上。

浙公网安备 33010602011771号