Eclipse running MAVEN Web project error:
Info: Starting Servlet engine:apache tomcat/7.0.57 January 07, 2015 11:50:44 pm org.apache.catalina.core.ContainerBase startinte rnal severity: A child container failed during startjava.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException:Failed to start component [Standardengine[catalina]. Standardhost[localhost]. Standardcontext[/minisns]]at Java.util.concurrent.FutureTask.report (futuretask.java:122) at Java.util.concurrent.FutureTask.get (futuretask.java:188) 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 (futuretask.java:262) at Java.util.concurrent.ThreadPoolExecutor.runWorker (threadpoolexecutor.java:11In Java.util.concurrent.threadpoolexecutor$worker.run (threadpoolexecutor.java:615) at Java.lang.Thread.run ( thread.java:744) caused by:org.apache.catalina.LifecycleException:Failed to start component [Standardengine[catalina ]. Standardhost[localhost]. Standardcontext[/minisns]]at Org.apache.catalina.util.LifecycleBase.start (lifecyclebase.java:154) ... 6 morecaused By:java.lang.noclassdeffounderror:org/springframework/context/applicationcontextat JAVA.LANG.CLASS.GETDECLAREDFIELDS0 (Native Method) at Java.lang.Class.privateGetDeclaredFields (class.java:2397) at Java.lang.Class.getDeclaredFields (class.java:1806) 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 morecaused By:java.lang.ClassNotFoundException:org.springframework.context.ApplicationContextat Org.apache.catalina.loader.WebappClassLoader.loadClass (webappclassloader.java:1720) at Org.apache.catalina.loader.WebappClassLoader.loadClass (webappclassloader.java:1571) ... More than January 07, 2015 11:50:44 pm org.apache.catalina.core.ContainerBase startinternal Grave: A child container failed during STA Rtjava.util. Concurrent. ExecutionException:org.apache.catalina.LifecycleException:Failed to start component [Standardengine[catalina]. Standardhost[localhost]]at Java.util.concurrent.FutureTask.report (futuretask.java:122) at Java.util.concurrent.FutureTask.get (futuretask.java:188) 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 (nativemethodaccessorimpl.java:57) at Sun.reflect.DelegatingMethodAccessorImpl.invoke (delegatingmethodaccessorimpl.java:43) at Java.lang.reflect.Method.invoke (method.java:606) 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 (futuretask.java:262) at Java.util.concurrent.ThreadPoolExecutor.runWorker ( threadpoolexecutor.java:1145) at Java.util.concurrent.threadpoolexecutor$worker.run (ThreadPoolExecutor.java:615) At Java.lang.Thread.run (thread.java:744) caused by:org.apache.catalina.lifecycleexception:a child container failed During Startat 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
The reason for this is that there is no jar specified in the Pom.xml in the Lib directory of the Tomcat counterpart, but there are jar packages that are imported through the normal method, the workaround is as follows:
1, right-click the project, select Properties, and then select Deployment Assembly:
2. Click Add ...
Then check: Java Build Path Entries, click next>
Select Maven Dependencies, then Finish, Ok.
The jar package specified in the Pom.xml-based MAVEN-built Web project in Eclipse cannot be published to Tomcat