tomcat启动异常:子容器启动失败(a child container failed during start)
2023-12-17 10:34:57
最近在使用eclipse启动Tomcat时,发现一个问题,启动以前的项目突然报子容器启动异常。
异常信息如下:
严重: 子容器启动失败
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: 无法启动组件[org.apache.catalina.webresources.StandardRoot@15fb69cc]
at java.util.concurrent.FutureTask.report(Unknown Source)
at java.util.concurrent.FutureTask.get(Unknown Source)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:931)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1412)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1402)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.catalina.LifecycleException: 无法启动组件[org.apache.catalina.webresources.StandardRoot@15fb69cc]
at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4803)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4939)
... 7 more
Caused by: java.lang.IllegalArgumentException: 指定的主资源集 [D:\eclipse4.14Code\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\Web3] 无效
at org.apache.catalina.webresources.StandardRoot.createMainResourceSet(StandardRoot.java:747)
at org.apache.catalina.webresources.StandardRoot.startInternal(StandardRoot.java:705)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
... 9 more
十二月 17, 2023 9:48:43 上午 org.apache.jasper.servlet.TldScanner scanJars
信息: 至少有一个JAR被扫描用于TLD但尚未包含TLD。 为此记录器启用调试日志记录,以获取已扫描但未在其中找到TLD的完整JAR列表。 在扫描期间跳过不需要的JAR可以缩短启动时间和JSP编译时间。
十二月 17, 2023 9:48:43 上午 org.apache.catalina.core.ContainerBase startInternal
严重: 子容器启动失败
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: 子容器启动失败
at java.util.concurrent.FutureTask.report(Unknown Source)
at java.util.concurrent.FutureTask.get(Unknown Source)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:931)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:258)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:766)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.startup.Catalina.start(Catalina.java:688)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:342)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:473)
Caused by: org.apache.catalina.LifecycleException: 子容器启动失败
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:942)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1412)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1402)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: 无法启动组件[org.apache.catalina.webresources.StandardRoot@15fb69cc]
at java.util.concurrent.FutureTask.report(Unknown Source)
at java.util.concurrent.FutureTask.get(Unknown Source)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:931)
... 8 more
Caused by: org.apache.catalina.LifecycleException: 无法启动组件[org.apache.catalina.webresources.StandardRoot@15fb69cc]
at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4803)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4939)
... 7 more
Caused by: java.lang.IllegalArgumentException: 指定的主资源集 [D:\eclipse4.14Code\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\Web3] 无效
at org.apache.catalina.webresources.StandardRoot.createMainResourceSet(StandardRoot.java:747)
at org.apache.catalina.webresources.StandardRoot.startInternal(StandardRoot.java:705)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
... 9 more
十二月 17, 2023 9:48:43 上午 org.apache.catalina.startup.Catalina start
严重: 所必需的服务组件启动失败,所以无法启动Tomcat
org.apache.catalina.LifecycleException: 子容器启动失败
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:942)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:258)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:766)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.startup.Catalina.start(Catalina.java:688)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:342)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:473)
Caused by: java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: 子容器启动失败
at java.util.concurrent.FutureTask.report(Unknown Source)
at java.util.concurrent.FutureTask.get(Unknown Source)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:931)
... 13 more
Caused by: org.apache.catalina.LifecycleException: 子容器启动失败
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:942)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1412)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1402)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: 无法启动组件[org.apache.catalina.webresources.StandardRoot@15fb69cc]
at java.util.concurrent.FutureTask.report(Unknown Source)
at java.util.concurrent.FutureTask.get(Unknown Source)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:931)
... 8 more
Caused by: org.apache.catalina.LifecycleException: 无法启动组件[org.apache.catalina.webresources.StandardRoot@15fb69cc]
at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4803)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4939)
... 7 more
Caused by: java.lang.IllegalArgumentException: 指定的主资源集 [D:\eclipse4.14Code\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\Web3] 无效
at org.apache.catalina.webresources.StandardRoot.createMainResourceSet(StandardRoot.java:747)
at org.apache.catalina.webresources.StandardRoot.startInternal(StandardRoot.java:705)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
... 9 more
我们从上面那么长的错误信息中提取关键字眼如下
Caused by: java.lang.IllegalArgumentException: 指定的主资源集 [D:\eclipse4.14Code\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\Web3] 无效
我们可以清晰的读到加载Web3这个项目无效
于是我们找到Server这个工程
这个Server工程是我们在启动Tomcat时自动生成的一个工程,该工程里面包含Tomcat的重要信息,切记不可以删除掉。这里可以看到我运行了4个Tomcat,所以会出现四个Tomcat的文件夹,每一个Tomcat文件夹包含当前Tomcat配置的重要信息,我们打开红色箭头指向的文件
红色框框处的这行代码是以前Tomcat运行Web3这个项目时生成的一条记录,
现在Web3这个项目既然已经无法运行了,我们将其注释掉重启即可解决问题
最终运营结果:
看到箭头处表明我们的Tomcat工程启动成功
文章来源:https://blog.csdn.net/CNCDXX_88/article/details/135041710
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。 如若内容造成侵权/违法违规/事实不符,请联系我的编程经验分享网邮箱:veading@qq.com进行投诉反馈,一经查实,立即删除!
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。 如若内容造成侵权/违法违规/事实不符,请联系我的编程经验分享网邮箱:veading@qq.com进行投诉反馈,一经查实,立即删除!