老铁看个问题 Tomcat 把 JDBC 驱动强行注销的问题

2019-07-05 20:46:19 +08:00
 douleL
springboot war 包
05-Jul-2019 20:39:45.595 警告 [RMI TCP Connection(2)-127.0.0.1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [flowale] registered the JDBC driver [com.alibaba.druid.mock.MockDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
8786 次点击
所在节点    Java
4 条回复
undeflife
2019-07-05 23:36:42 +08:00
druid 的 bug.
https://github.com/alibaba/druid/issues/1699

PS:前段时间好有几个人问我数据库闪断不会自动重连,也发现是 druid 的 bug
这个东西是真的并不好,如果对 druid 的监控和扩展功能没有依赖的话,建议用其他的 如 hikari
douleL
2019-07-06 10:54:19 +08:00
@undeflife 感谢老哥提示 我这边是把 springboot 项目 war 包启动 jar 包方式没问题 但是 war 包 配置 tomcat 8 启动就遇到了 真是头大 我这边尝试下
douleL
2019-07-06 18:09:51 +08:00
06-Jul-2019 18:01:41.414 严重 [RMI TCP Connection(2)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal One or more Filters failed to start. Full details will be found in the appropriate container log file
06-Jul-2019 18:01:41.414 严重 [RMI TCP Connection(2)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal Context [/project_client] startup failed due to previous errors
18:01:41.424 [RMI TCP Connection(2)-127.0.0.1] INFO o.s.s.c.ThreadPoolTaskExecutor - [shutdown,208] - Shutting down ExecutorService 'applicationTaskExecutor'
18:01:41.433 [RMI TCP Connection(2)-127.0.0.1] INFO c.a.d.p.DruidDataSource - [close,1825] - {dataSource-1} closed
06-Jul-2019 18:01:41.440 警告 [RMI TCP Connection(2)-127.0.0.1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [project_client] registered the JDBC driver [com.alibaba.druid.mock.MockDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
06-Jul-2019 18:01:41.440 警告 [RMI TCP Connection(2)-127.0.0.1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [project_client] registered the JDBC driver [com.mysql.cj.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.
06-Jul-2019 18:01:41.440 警告 [RMI TCP Connection(2)-127.0.0.1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [project_client] registered the JDBC driver [com.alibaba.druid.proxy.DruidDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
[2019-07-06 06:01:41,458] Artifact project_client:war exploded: Error during artifact deployment. See server log for details.
06-Jul-2019 18:01:44.619 信息 [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:1328)
at org.apache.catalina.loader.WebappClassLoaderBase.getResource(WebappClassLoaderBase.java:1003)
at com.mysql.cj.jdbc.AbandonedConnectionCleanupThread.checkContextClassLoaders(AbandonedConnectionCleanupThread.java:96)
at com.mysql.cj.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:69)
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)
核心报错如上
douleL
2019-07-06 18:10:12 +08:00

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/580444

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX