Tomcat项目404,报WARNING:org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads

本文记录了阿里云服务器续费后,Tomcat启动出现404错误的问题排查过程。问题根源在于MySQL服务未启动,通过service mysqld start命令解决了这一问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

前些日子买的阿里云服务器到期了,服务器停机几天后续费,重启tomcat时报错:

07-Aug-2019 16:56:41.056 WARNING [Catalina-utility-2] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [EnglishClub] 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)
 java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:144)
 com.mysql.cj.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:70)
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
 java.lang.Thread.run(Thread.java:748)

刚开始也没咋注意,认为就一个WARNING,又不是ERROR,但不曾想tomcat启动后项目一直404。

疯狂debug后发现,问题在它:

 com.mysql.cj.jdbc.A

01-Jul-2025 18:26:22.896 SEVERE [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal Context [/ecm-sf5-cn] startup failed due to previous errors 01-Jul-2025 18:26:22.968 WARNING [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [ecm-sf5-cn] appears to have started a thread named [Catalina-utility-2] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: org.apache.catalina.core.StandardContext.backgroundProcess(StandardContext.java:4825) org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1172) org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1176) org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1176) org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1154) java.base@17.0.12/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) java.base@17.0.12/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) java.base@17.0.12/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) java.base@17.0.12/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) java.base@17.0.12/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63) java.base@17.0.12/java.lang.Thread.run(Thread.java:840) 01-Jul-2025 18:26:22.968 WARNING [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [ecm-sf5-cn] appears to have started a thread named [DefaultQuartzScheduler_QuartzSchedulerThread] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: java.base@17.0.12/java.lang.Object.wait(Native Method) org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:427) 01-Jul-2025 18:26:22.977 SEVERE [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ecm-sf5-cn] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@3777677a]) and a value of type [com.documentum.web.env.app.AppServerEnvironment] (value [[Name = App Server Environment, Description = App Server Environment Implementation, Major Version = 0, Minor Version = 1, Author = Documentum, Portal Description = App Server, Portal Version = x.x, Environment Base Version = 1.0, Environment Service Version = 6.0, Supports Dispatch Contract = true, Supports Theme Contract = true, Supports Error Contract = true, Supports FormOperationListener Contract = false, Supports Locale Contract = true, Supports Session Contract = true, Supports Tag Contract = false, Supports Render Contract = true, Supports Login Contract = false, Supports Security Contract = true, Supports ActionPrecondition Contract = false, Supports MessageService Contract = false, Supports SuperCredentials Contract = true, Supports Preference Contract = true, Supports ContentTransfer Contract = true]]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak. [2025-07-01 06:26:22,998] Artifact ecm-sf5-cn: Error during artifact deployment. See server log for details.
最新发布
07-02
12-Jul-2023 18:36:28.896 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file 12-Jul-2023 18:36:28.898 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal Context [/setting] startup failed due to previous errors 2023-07-12 18:36:28,899 [// - - ] INFO org.springframework.web.context.support.XmlWebApplicationContext - Closing Root WebApplicationContext: startup date [Wed Jul 12 18:36:27 CST 2023]; root of context hierarchy 2023-07-12 18:36:28,900 [// - - ] INFO org.springframework.cache.ehcache.EhCacheManagerFactoryBean - Shutting down EhCache CacheManager 12-Jul-2023 18:36:28.908 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [setting] 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. 12-Jul-2023 18:36:28.908 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [setting] 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) java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:143) com.mysql.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:40)
07-13
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

请保持优秀。

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值