V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
douleL
V2EX  ›  Java

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

  •  1
     
  •   douleL · 2019-07-05 20:46:19 +08:00 · 8794 次点击
    这是一个创建于 1966 天前的主题,其中的信息可能已经有所发展或是发生改变。
    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.
    undeflife
        1
    undeflife  
       2019-07-05 23:36:42 +08:00
    druid 的 bug.
    https://github.com/alibaba/druid/issues/1699

    PS:前段时间好有几个人问我数据库闪断不会自动重连,也发现是 druid 的 bug
    这个东西是真的并不好,如果对 druid 的监控和扩展功能没有依赖的话,建议用其他的 如 hikari
    douleL
        2
    douleL  
    OP
       2019-07-06 10:54:19 +08:00
    @undeflife 感谢老哥提示 我这边是把 springboot 项目 war 包启动 jar 包方式没问题 但是 war 包 配置 tomcat 8 启动就遇到了 真是头大 我这边尝试下
    douleL
        3
    douleL  
    OP
       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
        4
    douleL  
    OP
       2019-07-06 18:10:12 +08:00
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3311 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 20ms · UTC 04:54 · PVG 12:54 · LAX 20:54 · JFK 23:54
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.