老师的代码错误
还有0人有此问题
发表在JavaWeb图书答疑 2019-03-16
是否精华
版块置顶:

老师您好,我是按照您视频中讲解的代码来敲的,导入的包也是和您的一模一样,可是却出现如下的错误


java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/StrutsDemo]]
 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:951)
 at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:839)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
 at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1429)
 at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
 at java.util.concurrent.FutureTask.run(Unknown Source)
 at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
 at java.util.concurrent.AbstractExecutorService.submit(Unknown Source)
 at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:944)
 at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:261)
 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:770)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:682)
 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:350)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/StrutsDemo]]
 at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:441)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
 at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1429)
 at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
 at java.util.concurrent.FutureTask.run(Unknown Source)
 at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
 at java.util.concurrent.AbstractExecutorService.submit(Unknown Source)
 at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:944)
 ... 21 more
Caused by: java.lang.NoClassDefFoundError: Lorg/apache/logging/log4j/Logger;
 at java.lang.Class.getDeclaredFields0(Native Method)
 at java.lang.Class.privateGetDeclaredFields(Unknown Source)
 at java.lang.Class.getDeclaredFields(Unknown Source)
 at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:110)
 at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:269)
 at org.apache.catalina.startup.WebAnnotationSet.loadApplicationFilterAnnotations(WebAnnotationSet.java:109)
 at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:68)
 at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:328)
 at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:768)
 at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:299)
 at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
 at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5007)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
 ... 27 more
Caused by: java.lang.ClassNotFoundException: org.apache.logging.log4j.Logger
 at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1309)
 at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1138)
 ... 40 more

三月 16, 2019 7:05:24 下午 org.apache.catalina.core.ContainerBase startInternal
严重: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: A child container failed during start
 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:951)
 at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:261)
 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:770)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:682)
 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:350)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492)
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
 at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:960)
 at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:839)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
 at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1429)
 at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
 at java.util.concurrent.FutureTask.run(Unknown Source)
 at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
 at java.util.concurrent.AbstractExecutorService.submit(Unknown Source)
 at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:944)
 ... 13 more
Caused by: java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/StrutsDemo]]
 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:951)
 ... 21 more
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/StrutsDemo]]
 at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:441)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
 at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1429)
 at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
 at java.util.concurrent.FutureTask.run(Unknown Source)
 at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
 at java.util.concurrent.AbstractExecutorService.submit(Unknown Source)
 at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:944)
 ... 21 more
Caused by: java.lang.NoClassDefFoundError: Lorg/apache/logging/log4j/Logger;
 at java.lang.Class.getDeclaredFields0(Native Method)
 at java.lang.Class.privateGetDeclaredFields(Unknown Source)
 at java.lang.Class.getDeclaredFields(Unknown Source)
 at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:110)
 at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:269)
 at org.apache.catalina.startup.WebAnnotationSet.loadApplicationFilterAnnotations(WebAnnotationSet.java:109)
 at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:68)
 at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:328)
 at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:768)
 at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:299)
 at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
 at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5007)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
 ... 27 more
Caused by: java.lang.ClassNotFoundException: org.apache.logging.log4j.Logger
 at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1309)
 at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1138)
 ... 40 more

三月 16, 2019 7:05:24 下午 org.apache.catalina.startup.Catalina start
严重: The required Server component failed to start so Tomcat is unable to start.
org.apache.catalina.LifecycleException: A child container failed during start
 at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:960)
 at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:261)
 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:770)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:682)
 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:350)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492)
Caused by: java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: A child container failed during start
 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:951)
 ... 13 more
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
 at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:960)
 at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:839)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
 at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1429)
 at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
 at java.util.concurrent.FutureTask.run(Unknown Source)
 at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
 at java.util.concurrent.AbstractExecutorService.submit(Unknown Source)
 at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:944)
 ... 13 more
Caused by: java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/StrutsDemo]]
 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:951)
 ... 21 more
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/StrutsDemo]]
 at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:441)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
 at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1429)
 at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
 at java.util.concurrent.FutureTask.run(Unknown Source)
 at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
 at java.util.concurrent.AbstractExecutorService.submit(Unknown Source)
 at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:944)
 ... 21 more
Caused by: java.lang.NoClassDefFoundError: Lorg/apache/logging/log4j/Logger;
 at java.lang.Class.getDeclaredFields0(Native Method)
 at java.lang.Class.privateGetDeclaredFields(Unknown Source)
 at java.lang.Class.getDeclaredFields(Unknown Source)
 at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:110)
 at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:269)
 at org.apache.catalina.startup.WebAnnotationSet.loadApplicationFilterAnnotations(WebAnnotationSet.java:109)
 at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:68)
 at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:328)
 at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:768)
 at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:299)
 at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
 at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5007)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
 ... 27 more
Caused by: java.lang.ClassNotFoundException: org.apache.logging.log4j.Logger
 at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1309)
 at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1138)
 ... 40 more


分享到:
精彩评论 1
无语_mrkj
学分:3155 LV11
2019-03-28
沙发

您使用是的什么版本的Tomcat和JDK?

另外,您按照下面的步骤操作一下看看,能不能解决?

https://blog.csdn.net/weixin_42447373/article/details/80701931

如果解决不了,把您的Eclipse窗口截图发上来我们看一下。还有Markers面板中有没有错误信息。

首页上一页 1 下一页尾页 1 条记录 1/1页
手机同步功能介绍
友情提示:以下图书配套资源能够实现手机同步功能
明日微信公众号
明日之星 明日之星编程特训营
客服热线(每日9:00-17:00)
400 675 1066
mingrisoft@mingrisoft.com
吉林省明日科技有限公司Copyright ©2007-2022,mingrisoft.com, All Rights Reserved长春市北湖科技开发区盛北大街3333号长春北湖科技园项目一期A10号楼四、五层
吉ICP备10002740号-2吉公网安备22010202000132经营性网站备案信息 营业执照