参考: https://bbs.csdn.net/topics/392090371

 1 omcat无法启动,报如下错误:
 2 严重: A child container failed during start
 3 java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
 4 at java.util.concurrent.FutureTask.report(Unknown Source)
 5 at java.util.concurrent.FutureTask.get(Unknown Source)
 6 at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1119)
 7 at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:819)
 8 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
 9 at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1571)
10 at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1561)
11 at java.util.concurrent.FutureTask.run(Unknown Source)
12 at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
13 at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
14 at java.lang.Thread.run(Unknown Source)
15 Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
16 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:153)
17 ... 6 more
18 Caused by: java.lang.NoClassDefFoundError: Lorg/apache/commons/logging/Log;
19 at java.lang.Class.getDeclaredFields0(Native Method)
20 at java.lang.Class.privateGetDeclaredFields(Unknown Source)
21 at java.lang.Class.getDeclaredFields(Unknown Source)
22 at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:106)
23 at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:270)
24 at org.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:139)
25 at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:65)
26 at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:416)
27 at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:890)
28 at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:387)
29 at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
30 at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
31 at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5503)
32 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
33 ... 6 more
34 Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.Log
35 at java.net.URLClassLoader$1.run(Unknown Source)
36 at java.net.URLClassLoader$1.run(Unknown Source)
37 at java.security.AccessController.doPrivileged(Native Method)
38 at java.net.URLClassLoader.findClass(Unknown Source)
39 at java.lang.ClassLoader.loadClass(Unknown Source)
40 at java.lang.ClassLoader.loadClass(Unknown Source)
41 ... 20 more

解决办法:

<dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging-api</artifactId>
            <version>1.1</version>
        </dependency>
03-27 06:28