重新部署项目报错警告

来源:4-6 登陆和个人中心(下)

永夜将至

2019-06-11 13:08:08

[2019-06-11 01:03:52,690] Artifact oa_web:war exploded: Artifact is being deployed, please wait...
11-Jun-2019 13:03:52.864 警告 [RMI TCP Connection(6)-127.0.0.1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [ROOT] 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.
11-Jun-2019 13:03:55.089 信息 [Abandoned connection cleanup thread] org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading Illegal access: this web application instance has been stopped already. Could not load []. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
 java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load []. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
	at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading(WebappClassLoaderBase.java:1348)
	at org.apache.catalina.loader.WebappClassLoaderBase.getResource(WebappClassLoaderBase.java:1005)
	at com.mysql.jdbc.AbandonedConnectionCleanupThread.checkContextClassLoaders(AbandonedConnectionCleanupThread.java:90)
	at com.mysql.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:63)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

1.这警告是什么意思?怎么解决?

2.报错信息是什么意思?

写回答

1回答

芝芝兰兰

2019-06-11

同学你好。遇到这些提示信息,可以先试着翻译一下

1、异常[RMI TCP Connection(6)-127.0.0.1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [ROOT] 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.

Web应用程序[ROOT]注册了jdbc驱动程序[com.mysql.jdbc.driver],但在Web应用程序停止时无法注销它。为了防止内存泄漏,JDBC驱动程序已被强制取消注册。

2、报错java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load []. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.

非法访问:此Web应用程序实例已停止了。无法加载[]。最终是由下面的堆栈跟踪调试目的,以及试图终止线程从而导致非法访问抛出一个错误造成的,并没有功能的影响。

3、以上问题是在关闭应用服务器或重新部署装载项目失败会发生。当应用程序卸载时,并不会关闭所有的线程。当tomcat已经关闭了其类加载器后,一些线程依然会继续运行,这样就导致出错,这些错误就会被到日志文件里。 

修改tomcat目录下conf文件夹下的server.xml, 在<Host>标签添加子元素找到<Context>标签,把reloadble的属性值设为:reloadable="false"。禁用热部署。

reloadable如果设为true,tomcat服务器在运行状态下会监视在WEB-INF/classes和WEB-INF/lib目录下class文件的改动,如果监测到有class文件被更新的,服务器会自动重新加载Web应用 ,也就是热部署。 它有助于调试servlet和其它的class文件,但这样用加重服务器运行负荷。

如果解答了同学的疑问,望采纳~

祝学习愉快~


0

0 学习 · 4317 问题

查看课程