解决:the JDBC Driver has been forcibly unregistered

  启动Tomcat时报错

复制代码
 1 严重: The web application [/service] 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.  
 2 一月 25, 2018 11:58:37 上午 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc  
 3 严重: The web application [/service] 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.  
 4 一月 25, 2018 11:58:37 上午 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads  
 5 严重: The web application [/service] 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.  
 6 一月 25, 2018 11:58:37 上午 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads  
 7 严重: The web application [/service] appears to have started a thread named [New I/O worker #1] but has failed to stop it. This is very likely to create a memory leak.  
 8 一月 25, 2018 11:58:37 上午 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads  
 9 严重: The web application [/service] appears to have started a thread named [New I/O worker #2] but has failed to stop it. This is very likely to create a memory leak.  
10 一月 25, 2018 11:58:37 上午 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads  
11 严重: The web application [/service] appears to have started a thread named [New I/O worker #3] but has failed to stop it. This is very likely to create a memory leak.  
12 一月 25, 2018 11:58:37 上午 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads  
13 严重: The web application [/service] appears to have started a thread named [New I/O worker #4] but has failed to stop it. This is very likely to create a memory leak.  
复制代码

 

查看catalina.out日志,前前后后都没有任何错误信息。

网上有说热部署造成的,有说jar包冲突造成的,也有说可以忽略的,全部试了一遍以后,并不能解决问题。

其实造成这个问题的原因有很多种,比如数据库连不上,中间件连接初始化失败等等。但是,都不会输出在catalina.out,而是输出到logs目录下的localhost.201x-xx-xx.log文件。如果遇到这种问题,可以查看该日志,可迅速定位问题原因。

以上转载自:https://www.iteye.com/blog/rhodian-2409008

 

我出现的问题是,增量更新服务器class文件时,直接替换会出现class文件自动删减末尾的情况,报错:Caused by: java.lang.ClassFormatError: Extra bytes at the end of class file。只有替换class文件会出现,新增不会,目前原因不明;

同样的问题还发现,利用xftp直接编辑线上的文件,也会出现同样的情况(删减末尾)。

慎用这种粗暴的方式,用linux命令。

补充:像过滤器,拦截器,以及没有被捕捉的异常报出的问题都会记录在localhost.xxxx-xx-xx.log文件中。【了解tomcat日志文件的区别】

posted @   厄舍屋下  阅读(731)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
点击右上角即可分享
微信分享提示