tomcat应用org.apache.catalina.LifecycleException: Failed to stop component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]异常的根本原因

早上,有个应用又挂了,客户端打开时报404,看进程是还在的。倒回第一次异常的地方,可见catalina.out中有如下信息:

08:46:56.646 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] DEBUG o.s.b.f.s.DisposableBeanAdapter - Invoking destroy() on bean with name ‘org.springframework.scheduling.config.ContextLifecycleSchedul
edTaskRegistrar#0‘
08:46:56.647 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Retrieved dependent beans for bean ‘(inner bean)#293beccc‘: [org.springframework.aop.aspectj.A
spectJPointcutAdvisor#1]
08:46:56.647 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Retrieved dependent beans for bean ‘(inner bean)#debcf58‘: [(inner bean)#293beccc]
08:46:56.647 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Retrieved dependent beans for bean ‘(inner bean)#430751d4‘: [org.springframework.aop.aspectj.A
spectJPointcutAdvisor#0]
08:46:56.647 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Retrieved dependent beans for bean ‘(inner bean)#429fcab3‘: [(inner bean)#430751d4]
Feb 04, 2017 8:46:56 AM org.apache.catalina.core.StandardContext reload
SEVERE: Exception stopping Context with name []
org.apache.catalina.LifecycleException: Failed to stop component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:236)
at org.apache.catalina.core.StandardContext.reload(StandardContext.java:4090)
at org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:425)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1344)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1545)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1555)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1555)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1523)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.catalina.LifecycleException: Failed to stop component [WebappLoader[]]
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:236)
at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5829)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
... 8 more
Caused by: java.lang.NullPointerException
at org.apache.catalina.loader.WebappClassLoaderBase.findResourceInternal(WebappClassLoaderBase.java:3308)
at org.apache.catalina.loader.WebappClassLoaderBase.findResource(WebappClassLoaderBase.java:1428)
at org.apache.catalina.loader.WebappClassLoaderBase.getResourceAsStream(WebappClassLoaderBase.java:1656)
at org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc(WebappClassLoaderBase.java:2223)
at org.apache.catalina.loader.WebappClassLoaderBase.clearReferences(WebappClassLoaderBase.java:2166)
at org.apache.catalina.loader.WebappClassLoaderBase.stop(WebappClassLoaderBase.java:2066)
at org.apache.catalina.loader.WebappLoader.stopInternal(WebappLoader.java:661)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
... 10 more

Feb 04, 2017 8:46:56 AM org.apache.catalina.util.LifecycleBase stop
INFO: The stop() method was called on component [[email protected]] after stop() had already been called. The second call will be ignored.
Feb 04, 2017 8:46:56 AM org.apache.catalina.core.StandardContext reload

这比较坑爹的是,好像没有一个属性在server.xml中设置如果某个webapp挂了,tomcat直接退出的。不然的话,如果后面有不受容器管理的操作比如socket连接,将会使得应用日志最后看起来是正常的,但实际上已经挂了。

这里其实看不出为什么应用挂掉的,逐步往后回查(看日志级别为SEVERE的),发现如下错误:

SEVERE: Resource ‘/WEB-INF/lib/slf4j-api-1.7.10.jar‘ is missing
Feb 04, 2017 8:46:56 AM org.apache.catalina.core.StandardContext reload
INFO: Reloading Context with name [] has started

看应用中,1.7.12的版本是有的。

怀疑是 <Context>节点的reloadable设置为"true"造成的,经查,该值确实为true,应该是自动加载期间版本不一致问题所致。

时间: 2024-12-10 03:53:54

tomcat应用org.apache.catalina.LifecycleException: Failed to stop component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]异常的根本原因的相关文章

tomcat启动报错:org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]

org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]] 原因: tomcat版本小于jdk版本.当前jdk1.8版本.tomcat1.7版本. 将tomcat改为8.5版本后解决. 原文地址:https://www.cnblogs.com/zltao/p/11262876.html

java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/xiaozao_web]]

二月 20, 2017 11:30:28 上午 org.apache.tomcat.util.digester.SetPropertiesRule begin警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:xiaozao_web' did not find a matching property.二月 20, 2

org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].Standard

在对类文件加密了之后,Tomcat启动时输出如下错误提示: 22-May-2015 18:18:07.354 WARNING [main] org.apache.catalina.startup.SetAllPropertiesRule.begin [SetAllPropertiesRule]{Server/Service/Connector} Setting property 'maxSpareThreads' to '1000' did not find a matching propert

java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina]

本文为博主原创,未经允许不得转载: 被坑了好长时间的bug,差点就要重新配置环境,重新下载,重新开始的境遇.在此记录一下: 首先展示一下报错的异常: 19-Apr-2018 09:29:18.218 SEVERE [Catalina-startStop-1] org.apache.catalina.core.ContainerBase.startInternal A child container failed during start java.util.concurrent.Executio

java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]

1.问题描述: 对于创建的springboot项目,通过启动类启动,访问没问题,但打成war部署到tomcat上启动报错,如下: 严重: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]] at org.apache.c

org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]

org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162) at org.apache.catalina.core.ContainerBase.a

##org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]异常处理

org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]异常处理 今天用maven创建了一个工程,结果启动tomcat之后,报错了: 严重: ContainerBase.addChild: start:  org.apache.catalina.LifecycleException: F

java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext

java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext struts包版本不对 用2.3的相应包 用在2.5里面了 例如 2.5里加上 原文地址:https://www.cnblogs.com/tk55/p/8

Tomcat启动报错:org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalin

Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled. 20:36:46.361 [RMI TCP Connection(3)-127.0.0.1] ERROR o.s.boot.SpringApplication - Application startup failed org.springframework