如何解决Failed to start component [StandardEngine[Catalina].StandardHost[127.0.0.1].StandardContext[]]问题

Posted 飞鱼君

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了如何解决Failed to start component [StandardEngine[Catalina].StandardHost[127.0.0.1].StandardContext[]]问题相关的知识,希望对你有一定的参考价值。

调试web项目,项目部署到tomcat,报如下错误:

 1 java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[127.0.0.1].StandardContext[]]
 2     at java.util.concurrent.FutureTask.report(FutureTask.java:122)
 3     at java.util.concurrent.FutureTask.get(FutureTask.java:192)
 4     at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:911)
 5     at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:890)
 6     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
 7     at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1403)
 8     at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1393)
 9     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
10     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
11     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
12     at java.lang.Thread.run(Thread.java:745)
13 Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[127.0.0.1].StandardContext[]]
14     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
15     ... 6 more
16 Caused by: org.apache.catalina.LifecycleException: Failed to start component [[email protected]]
17     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
18     at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4842)
19     at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4974)
20     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
21     ... 6 more
22 Caused by: java.lang.IllegalArgumentException: The main resource set specified [C:\Users\Lzj\.IntelliJIdea2016.2\system\tomcat\Unnamed_question\webapps\call] is not valid
23     at org.apache.catalina.webresources.StandardRoot.createMainResourceSet(StandardRoot.java:732)
24     at org.apache.catalina.webresources.StandardRoot.startInternal(StandardRoot.java:690)
25     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
26     ... 9 more
27 
28 22-Oct-2017 17:00:28.227 严重 [main] org.apache.catalina.core.ContainerBase.startInternal A child container failed during start
29  java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[127.0.0.1]]
30     at java.util.concurrent.FutureTask.report(FutureTask.java:122)
31     at java.util.concurrent.FutureTask.get(FutureTask.java:192)
32     at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:911)
33     at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
34     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
35     at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
36     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
37     at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:791)
38     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
39     at org.apache.catalina.startup.Catalina.start(Catalina.java:655)
40     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
41     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
42     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
43     at java.lang.reflect.Method.invoke(Method.java:498)
44     at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:355)
45     at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:495)
46 Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[127.0.0.1]]
47     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
48     at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1403)
49     at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1393)
50     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
51     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
52     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
53     at java.lang.Thread.run(Thread.java:745)
54 Caused by: org.apache.catalina.LifecycleException: A child container failed during start
55     at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:919)
56     at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:890)
57     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
58     ... 6 more
59 
60 22-Oct-2017 17:00:28.230 严重 [main] org.apache.catalina.startup.Catalina.start The required Server component failed to start so Tomcat is unable to start.
61  org.apache.catalina.LifecycleException: Failed to start component [StandardServer[8005]]
62     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
63     at org.apache.catalina.startup.Catalina.start(Catalina.java:655)
64     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
65     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
66     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
67     at java.lang.reflect.Method.invoke(Method.java:498)
68     at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:355)
69     at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:495)
70 Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Catalina]]
71     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
72     at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:791)
73     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
74     ... 7 more
75 Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina]]
76     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
77     at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
78     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
79     ... 9 more
80 Caused by: org.apache.catalina.LifecycleException: A child container failed during start
81     at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:919)
82     at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
83     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
84     ... 11 more

最后发现是tomcat安装目录/conf/server.xml配置的问题:

因为我之前配置了:

    <Engine>
      <Host name="127.0.0.1" debug="0" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false"  xmlNamespaceAware="false">
        <Context path="" docBase="call" debug="0" reloadable="true" crossContext="true"/>
        <Logger className="org.apache.catalina.logger.FileLogger" directory="logs" prefix="tot_log." suffix=".txt" timestamp="true"/>
      </Host>
    </Engine>

将这个Host节点注释,问题解决。

以上是关于如何解决Failed to start component [StandardEngine[Catalina].StandardHost[127.0.0.1].StandardContext[]]问题的主要内容,如果未能解决你的问题,请参考以下文章

启动项目报错——A child container failed during start——解决Failed to start component [StandardEngine[Catalina]

The required Server component failed to start so Tomcat is unable to start解决之一

Tomcat启动报错 Failed to start component [StandardServer[8005]]解决

如何解决esri_sde, Connection to RDBMS failed.

Starting zookeeper ... FAILED TO START

怎样解决电脑开机出现this application failed to start because it could not fi