前两天重新安装了jdk,tomcat,maven 等开发组件。然后将一个以前开发完成的一个项目放到tomcat中,eclipse的控制台打印出了异常日志如下:
SEVERE: A child container failed during start java.util.concurrent.ExecutionException:org.apache.catalina.LifecycleException:Failed to start component[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/cepis]]
at java.util.concurrent.FutureTask S y n c . i n n e r G e t ( F u t u r e T a s k . j a v a : 252 ) a t j a v a . u t i l . c o n c u r r e n t . F u t u r e T a s k . g e t ( F u t u r e T a s k . j a v a : 111 ) a t o r g . a p a c h e . c a t a l i n a . c o r e . C o n t a i n e r B a s e . s t a r t I n t e r n a l ( C o n t a i n e r B a s e . j a v a : 1128 ) a t o r g . a p a c h e . c a t a l i n a . c o r e . S t a n d a r d H o s t . s t a r t I n t e r n a l ( S t a n d a r d H o s t . j a v a : 782 ) a t o r g . a p a c h e . c a t a l i n a . u t i l . L i f e c y c l e B a s e . s t a r t ( L i f e c y c l e B a s e . j a v a : 150 ) a t o r g . a p a c h e . c a t a l i n a . c o r e . C o n t a i n e r B a s e Sync.innerGet(FutureTask.java:252) at java.util.concurrent.FutureTask.get(FutureTask.java:111) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1128) at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:782) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase Sync.innerGet(FutureTask.java:252)atjava.util.concurrent.FutureTask.get(FutureTask.java:111)atorg.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1128)atorg.apache.catalina.core.StandardHost.startInternal(StandardHost.java:782)atorg.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)atorg.apache.catalina.core.ContainerBaseStartChild.call(ContainerBase.java:1566)
at org.apache.catalina.core.ContainerBase S t a r t C h i l d . c a l l ( C o n t a i n e r B a s e . j a v a : 1556 ) a t j a v a . u t i l . c o n c u r r e n t . F u t u r e T a s k StartChild.call(ContainerBase.java:1556) at java.util.concurrent.FutureTask StartChild.call(ContainerBase.java:1556)atjava.util.concurrent.FutureTaskSync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor W o r k e r . r u n ( T h r e a d P o o l E x e c u t o r . j a v a : 603 ) a t j a v a . l a n g . T h r e a d . r u n ( T h r e a d . j a v a : 722 ) C a u s e d b y : o r g . a p a c h e . c a t a l i n a . L i f e c y c l e E x c e p t i o n : F a i l e d t o s t a r t c o m p o n e n t [ S t a n d a r d E n g i n e [ C a t a l i n a ] . S t a n d a r d H o s t [ l o c a l h o s t ] . S t a n d a r d C o n t e x t [ / c e p i s ] ] a t o r g . a p a c h e . c a t a l i n a . u t i l . L i f e c y c l e B a s e . s t a r t ( L i f e c y c l e B a s e . j a v a : 154 ) . . . 7 m o r e C a u s e d b y : j a v a . l a n g . N o C l a s s D e f F o u n d E r r o r : o r g / s p r i n g f r a m e w o r k / c o n t e x t / A p p l i c a t i o n C o n t e x t a t j a v a . l a n g . C l a s s . g e t D e c l a r e d F i e l d s 0 ( N a t i v e M e t h o d ) a t j a v a . l a n g . C l a s s . p r i v a t e G e t D e c l a r e d F i e l d s ( C l a s s . j a v a : 2308 ) a t j a v a . l a n g . C l a s s . g e t D e c l a r e d F i e l d s ( C l a s s . j a v a : 1760 ) a t o r g . a p a c h e . c a t a l i n a . s t a r t u p . W e b A n n o t a t i o n S e t . g e t D e c l a r e d F i e l d s ( W e b A n n o t a t i o n S e t . j a v a : 452 ) a t o r g . a p a c h e . c a t a l i n a . s t a r t u p . W e b A n n o t a t i o n S e t . l o a d F i e l d s A n n o t a t i o n ( W e b A n n o t a t i o n S e t . j a v a : 257 ) a t o r g . a p a c h e . c a t a l i n a . s t a r t u p . W e b A n n o t a t i o n S e t . l o a d A p p l i c a t i o n S e r v l e t A n n o t a t i o n s ( W e b A n n o t a t i o n S e t . j a v a : 136 ) a t o r g . a p a c h e . c a t a l i n a . s t a r t u p . W e b A n n o t a t i o n S e t . l o a d A p p l i c a t i o n A n n o t a t i o n s ( W e b A n n o t a t i o n S e t . j a v a : 66 ) a t o r g . a p a c h e . c a t a l i n a . s t a r t u p . C o n t e x t C o n f i g . a p p l i c a t i o n A n n o t a t i o n s C o n f i g ( C o n t e x t C o n f i g . j a v a : 381 ) a t o r g . a p a c h e . c a t a l i n a . s t a r t u p . C o n t e x t C o n f i g . c o n f i g u r e S t a r t ( C o n t e x t C o n f i g . j a v a : 858 ) a t o r g . a p a c h e . c a t a l i n a . s t a r t u p . C o n t e x t C o n f i g . l i f e c y c l e E v e n t ( C o n t e x t C o n f i g . j a v a : 345 ) a t o r g . a p a c h e . c a t a l i n a . u t i l . L i f e c y c l e S u p p o r t . f i r e L i f e c y c l e E v e n t ( L i f e c y c l e S u p p o r t . j a v a : 119 ) a t o r g . a p a c h e . c a t a l i n a . u t i l . L i f e c y c l e B a s e . f i r e L i f e c y c l e E v e n t ( L i f e c y c l e B a s e . j a v a : 90 ) a t o r g . a p a c h e . c a t a l i n a . c o r e . S t a n d a r d C o n t e x t . s t a r t I n t e r n a l ( S t a n d a r d C o n t e x t . j a v a : 5161 ) a t o r g . a p a c h e . c a t a l i n a . u t i l . L i f e c y c l e B a s e . s t a r t ( L i f e c y c l e B a s e . j a v a : 150 ) . . . 7 m o r e C a u s e d b y : j a v a . l a n g . C l a s s N o t F o u n d E x c e p t i o n : o r g . s p r i n g f r a m e w o r k . c o n t e x t . A p p l i c a t i o n C o n t e x t a t o r g . a p a c h e . c a t a l i n a . l o a d e r . W e b a p p C l a s s L o a d e r . l o a d C l a s s ( W e b a p p C l a s s L o a d e r . j a v a : 1711 ) a t o r g . a p a c h e . c a t a l i n a . l o a d e r . W e b a p p C l a s s L o a d e r . l o a d C l a s s ( W e b a p p C l a s s L o a d e r . j a v a : 1556 ) . . . 21 m o r e A u g 16 , 20129 : 18 : 19 A M o r g . a p a c h e . c a t a l i n a . c o r e . C o n t a i n e r B a s e s t a r t I n t e r n a l S E V E R E : A c h i l d c o n t a i n e r f a i l e d d u r i n g s t a r t j a v a . u t i l . c o n c u r r e n t . E x e c u t i o n E x c e p t i o n : o r g . a p a c h e . c a t a l i n a . L i f e c y c l e E x c e p t i o n : F a i l e d t o s t a r t c o m p o n e n t [ S t a n d a r d E n g i n e [ C a t a l i n a ] . S t a n d a r d H o s t [ l o c a l h o s t ] ] a t j a v a . u t i l . c o n c u r r e n t . F u t u r e T a s k Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722) Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/cepis]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154) ... 7 more Caused by:java.lang.NoClassDefFoundError: org/springframework/context/ApplicationContext at java.lang.Class.getDeclaredFields0(Native Method) at java.lang.Class.privateGetDeclaredFields(Class.java:2308) at java.lang.Class.getDeclaredFields(Class.java:1760) at org.apache.catalina.startup.WebAnnotationSet.getDeclaredFields(WebAnnotationSet.java:452) at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:257) at org.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:136) at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:66) at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:381) at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:858) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:345) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5161) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ... 7 more Caused by:java.lang.ClassNotFoundException: org.springframework.context.ApplicationContext at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1711) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1556) ... 21 moreAug 16, 2012 9:18:19 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 Worker.run(ThreadPoolExecutor.java:603)atjava.lang.Thread.run(Thread.java:722)Causedby:org.apache.catalina.LifecycleException:Failedtostartcomponent[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/cepis]]atorg.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)...7moreCausedby:java.lang.NoClassDefFoundError:org/springframework/context/ApplicationContextatjava.lang.Class.getDeclaredFields0(NativeMethod)atjava.lang.Class.privateGetDeclaredFields(Class.java:2308)atjava.lang.Class.getDeclaredFields(Class.java:1760)atorg.apache.catalina.startup.WebAnnotationSet.getDeclaredFields(WebAnnotationSet.java:452)atorg.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:257)atorg.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:136)atorg.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:66)atorg.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:381)atorg.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:858)atorg.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:345)atorg.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)atorg.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)atorg.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5161)atorg.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)...7moreCausedby:java.lang.ClassNotFoundException:org.springframework.context.ApplicationContextatorg.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1711)atorg.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1556)...21moreAug16,20129:18:19AMorg.apache.catalina.core.ContainerBasestartInternalSEVERE:Achildcontainerfailedduringstartjava.util.concurrent.ExecutionException:org.apache.catalina.LifecycleException:Failedtostartcomponent[StandardEngine[Catalina].StandardHost[localhost]]atjava.util.concurrent.FutureTaskSync.innerGet(FutureTask.java:252)
at java.util.concurrent.FutureTask.get(FutureTask.java:111)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1128)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:302)
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:732)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.startup.Catalina.start(Catalina.java:675)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:322)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:450)
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 S t a r t C h i l d . c a l l ( C o n t a i n e r B a s e . j a v a : 1566 ) a t o r g . a p a c h e . c a t a l i n a . c o r e . C o n t a i n e r B a s e StartChild.call(ContainerBase.java:1566) at org.apache.catalina.core.ContainerBase StartChild.call(ContainerBase.java:1566)atorg.apache.catalina.core.ContainerBaseStartChild.call(ContainerBase.java:1556)
at java.util.concurrent.FutureTask S y n c . i n n e r R u n ( F u t u r e T a s k . j a v a : 334 ) a t j a v a . u t i l . c o n c u r r e n t . F u t u r e T a s k . r u n ( F u t u r e T a s k . j a v a : 166 ) a t j a v a . u t i l . c o n c u r r e n t . T h r e a d P o o l E x e c u t o r . r u n W o r k e r ( T h r e a d P o o l E x e c u t o r . j a v a : 1110 ) a t j a v a . u t i l . c o n c u r r e n t . T h r e a d P o o l E x e c u t o r Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor Sync.innerRun(FutureTask.java:334)atjava.util.concurrent.FutureTask.run(FutureTask.java:166)atjava.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)atjava.util.concurrent.ThreadPoolExecutorWorker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: org.apache.catalina.LifecycleException: A child container failed during start at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1136)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:782)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) … 7 more Aug 16, 20129:18:19 AM org.apache.catalina.startup.Catalina
start SEVERE: Catalina.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:675)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:322)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:450)
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:732)
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:1136)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:302)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
… 11 more JUE 22, 2016 6:12:59 AM org.apache.catalina.startup.Catalina start INFO: Server startup in 885 ms
这个异常是因为我们没有将maven库映射到WEB-INF/lib下,
解决方法为:
右击项目–>点击property–>点击deployment assembly–>点击add–>点击 java build path entires -->点击next–>点击maven dependencies–>点击finish然后重启项目
转自:https://www.cnblogs.com/yidaijiankuanzhongbuhui/p/6646749.html