java org.apache.catalina.LifecycleException: 无法启动组件 [StandardEngine[Catalina].StandardHost[localhost].StandardContext
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/26691883/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext
提问by Karthikeyan Mohan
I tried for a simple hello world program in Spring with Apache Tomcat 7.0. I am getting the below error and server goes to a stop state.
我在 Spring 中使用 Apache Tomcat 7.0 尝试了一个简单的 hello world 程序。我收到以下错误,服务器进入停止状态。
SEVERE: A child container failed during start java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/PassportParking]] 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:1123) at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:816) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565) 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: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/PassportParking]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154) ... 6 more Caused by: java.lang.NoClassDefFoundError: org/springframework/core/NestedRuntimeException at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2957) at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1210) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1690) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571) 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:106) at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:270) at org.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:139) at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:65) at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:415) at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:892) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:386) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5380) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ... 6 more Caused by: java.lang.ClassNotFoundException: org.springframework.core.NestedRuntimeException at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571) ... 27 more
Nov 02, 2014 12:09:30 AM org.apache.catalina.core.ContainerBase startInternal SEVERE: A child container failed during start java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]] 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:1123) at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:300) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:739) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.startup.Catalina.start(Catalina.java:689) 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:321) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:455) Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565) 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: A child container failed during start at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1131) at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:816) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ... 6 more
Nov 02, 2014 12:09:30 AM org.apache.catalina.startup.Catalina start SEVERE: The required Server component failed to start so Tomcat is unable to start. org.apache.catalina.LifecycleException: Failed to start component [StandardServer[8005]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154) at org.apache.catalina.startup.Catalina.start(Catalina.java:689) 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:321) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:455) Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Catalina]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154) at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:739) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ... 7 more Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154) at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ... 9 more Caused by: org.apache.catalina.LifecycleException: A child container failed during start at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1131) at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:300) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ... 11 more
严重:启动期间子容器失败 java.util.concurrent.ExecutionException:org.apache.catalina.LifecycleException:无法在 java.util 启动组件 [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/PassportParking]]。 concurrent.FutureTask.report(Unknown Source) at java.util.concurrent.FutureTask.get(Unknown Source) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123) at org.apache.catalina.core .StandardHost.startInternal(StandardHost.java:816) 在 org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) 在 org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575) ) 在 org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565) 在 java.util.concurrent.FutureTask.run(Unknown Source) 在 java。util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) 引起:org.apache.catalina.LifecycleException:无法在 org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154) 处启动组件 [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/PassportParking]]……还有 6 个原因:java。 lang.NoClassDefFoundError: org/springframework/core/NestedRuntimeException at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at org. apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2957) 在 org.apache.catalina.loader。WebappClassLoader.findClass(WebappClassLoader.java:1210) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1690) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571) 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) :106) 在 org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:270) 在 org.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:139) 在 org.apache.catalina.startup. WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:65) 在 org.apache。catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:415) at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:892) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java: 386) 在 org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) 在 org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) 在 org.apache.catalina.core.StandardContext .startInternal(StandardContext.java:5380) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ... 6 导致:java.lang.ClassNotFoundException: org.springframework.core.NestedRuntimeException at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720) 在 org.apache.catalina.loader。WebappClassLoader.loadClass(WebappClassLoader.java:1571) ... 27 更多
2014 年 11 月 2 日上午 12:09:30 org.apache.catalina.core.ContainerBase startInternal 严重:启动期间子容器失败 java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: 无法启动组件 [StandardEngine [Catalina].StandardHost[localhost]] 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:1123) 在 org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:300) 在 org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) 在 org.apache.catalina .core.StandardService.startInternal(StandardService.java:443) 在 org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) 在 org.apache。catalina.core.StandardServer.startInternal(StandardServer.java:739) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.startup.Catalina.start(Catalina.java:第689话Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:321) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:455) 引起:org.apache.catalina.LifecycleException : 无法在 org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154) at org.apache.catalina.core 启动组件 [StandardEngine[Catalina].StandardHost[localhost]]。ContainerBase$StartChild.call(ContainerBase.java:1575) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565) 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) 引起:org.apache.catalina.LifecycleException:一个子容器在 org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1131) at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:816) at org.apache.catalina 启动时失败.util.LifecycleBase.start(LifecycleBase.java:150) ... 6 更多ContainerBase$StartChild.call(ContainerBase.java:1565) 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) 引起:org.apache.catalina.LifecycleException:子容器在 org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.startInternal(ContainerBase. java:1131) 在 org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:816) 在 org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ... 6 更多ContainerBase$StartChild.call(ContainerBase.java:1565) 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) 引起:org.apache.catalina.LifecycleException:子容器在 org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.startInternal(ContainerBase. java:1131) 在 org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:816) 在 org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ... 6 更多ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) 引起:org.apache.catalina.LifecycleException:子容器在 org.apache.catalina.core.ContainerBase.startInternal 启动期间失败(ContainerBase.java:1131) 在 org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:816) 在 org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ... 6 更多ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) 引起:org.apache.catalina.LifecycleException:子容器在 org.apache.catalina.core.ContainerBase.startInternal 启动期间失败(ContainerBase.java:1131) 在 org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:816) 在 org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ... 6 更多java:150) ... 6 更多java:150) ... 6 更多
2014 年 11 月 2 日上午 12:09:30 org.apache.catalina.startup.Catalina start 严重:所需的服务器组件无法启动,因此 Tomcat 无法启动。org.apache.catalina.LifecycleException:无法在 org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154) 的 org.apache.catalina.startup.Catalina.start( Catalina.java:689) 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:321) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:455) 引起:org.apache .catalina.LifecycleException:
回答by RichW
It looks to me like you're missing one or more the Spring Framework jars from your web application. If you look at the stack trace there's a line:
在我看来,您的 Web 应用程序中缺少一个或多个 Spring Framework jar。如果您查看堆栈跟踪,则有一行:
Caused by: java.lang.NoClassDefFoundError: org/springframework/core/NestedRuntimeException
I'd say you don't have the "spring-core" jar in your web application. You need the Spring jars in your web app's WEB-INF/lib directory. Most Spring-based web applications need at least "spring-beans", "spring-context", "spring-core" "spring-io" and "spring-web" .. perhaps more, I'm working from memory here.
我会说您的 Web 应用程序中没有“spring-core”jar。您需要 Web 应用程序的 WEB-INF/lib 目录中的 Spring jar。大多数基于 Spring 的 Web 应用程序至少需要“spring-beans”、“spring-context”、“spring-core”、“spring-io”和“spring-web”……也许更多,我在这里凭记忆工作。