Maven項目啟動報錯

來源:互聯網
上載者:User
 
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/ROOT]]<span style="white-space:pre"></span>at java.util.concurrent.FutureTask.report(FutureTask.java:122)<span style="white-space:pre"></span>at java.util.concurrent.FutureTask.get(FutureTask.java:188)<span style="white-space:pre"></span>at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)<span style="white-space:pre"></span>at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:816)<span style="white-space:pre"></span>at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)<span style="white-space:pre"></span>at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)<span style="white-space:pre"></span>at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)<span style="white-space:pre"></span>at java.util.concurrent.FutureTask.run(FutureTask.java:262)<span style="white-space:pre"></span>at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)<span style="white-space:pre"></span>at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)<span style="white-space:pre"></span>at java.lang.Thread.run(Thread.java:745)Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/ROOT]]<span style="white-space:pre"></span>at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)<span style="white-space:pre"></span>... 6 moreCaused by: java.lang.NoClassDefFoundError: org/apache/commons/fileupload/FileUploadException<span style="white-space:pre"></span>at java.lang.Class.getDeclaredFields0(Native Method)<span style="white-space:pre"></span>at java.lang.Class.privateGetDeclaredFields(Class.java:2436)<span style="white-space:pre"></span>at java.lang.Class.getDeclaredFields(Class.java:1806)<span style="white-space:pre"></span>at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:106)<span style="white-space:pre"></span>at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:270)<span style="white-space:pre"></span>at org.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:139)<span style="white-space:pre"></span>at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:65)<span style="white-space:pre"></span>at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:415)<span style="white-space:pre"></span>at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:892)<span style="white-space:pre"></span>at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:386)<span style="white-space:pre"></span>at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)<span style="white-space:pre"></span>at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)<span style="white-space:pre"></span>at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5380)<span style="white-space:pre"></span>at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)<span style="white-space:pre"></span>... 6 moreCaused by: java.lang.ClassNotFoundException: org.apache.commons.fileupload.FileUploadException<span style="white-space:pre"></span>at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720)<span style="white-space:pre"></span>at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)<span style="white-space:pre"></span>... 20 more五月 31, 2016 1:35:27 下午 org.apache.catalina.core.ContainerBase startInternal嚴重: A child container failed during startjava.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]<span style="white-space:pre"></span>at java.util.concurrent.FutureTask.report(FutureTask.java:122)<span style="white-space:pre"></span>at java.util.concurrent.FutureTask.get(FutureTask.java:188)<span style="white-space:pre"></span>at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)<span style="white-space:pre"></span>at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:300)<span style="white-space:pre"></span>at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)<span style="white-space:pre"></span>at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)<span style="white-space:pre"></span>at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)<span style="white-space:pre"></span>at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:739)<span style="white-space:pre"></span>at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)<span style="white-space:pre"></span>at org.apache.catalina.startup.Catalina.start(Catalina.java:689)<span style="white-space:pre"></span>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<span style="white-space:pre"></span>at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)<span style="white-space:pre"></span>at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)<span style="white-space:pre"></span>at java.lang.reflect.Method.invoke(Method.java:606)<span style="white-space:pre"></span>at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:321)<span style="white-space:pre"></span>at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:455)Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]<span style="white-space:pre"></span>at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)<span style="white-space:pre"></span>at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)<span style="white-space:pre"></span>at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)<span style="white-space:pre"></span>at java.util.concurrent.FutureTask.run(FutureTask.java:262)<span style="white-space:pre"></span>at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)<span style="white-space:pre"></span>at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)<span style="white-space:pre"></span>at java.lang.Thread.run(Thread.java:745)Caused by: org.apache.catalina.LifecycleException: A child container failed during start<span style="white-space:pre"></span>at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1131)<span style="white-space:pre"></span>at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:816)<span style="white-space:pre"></span>at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)<span style="white-space:pre"></span>... 6 more五月 31, 2016 1:35:27 下午 org.apache.catalina.startup.Catalina start嚴重: The required Server component failed to start so Tomcat is unable to start.org.apache.catalina.LifecycleException: Failed to start component [StandardServer[8025]]<span style="white-space:pre"></span>at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)<span style="white-space:pre"></span>at org.apache.catalina.startup.Catalina.start(Catalina.java:689)<span style="white-space:pre"></span>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<span style="white-space:pre"></span>at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)<span style="white-space:pre"></span>at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)<span style="white-space:pre"></span>at java.lang.reflect.Method.invoke(Method.java:606)<span style="white-space:pre"></span>at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:321)<span style="white-space:pre"></span>at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:455)Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Catalina]]<span style="white-space:pre"></span>at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)<span style="white-space:pre"></span>at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:739)<span style="white-space:pre"></span>at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)<span style="white-space:pre"></span>... 7 moreCaused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina]]<span style="white-space:pre"></span>at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)<span style="white-space:pre"></span>at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)<span style="white-space:pre"></span>at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)<span style="white-space:pre"></span>... 9 moreCaused by: org.apache.catalina.LifecycleException: A child container failed during start<span style="white-space:pre"></span>at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1131)<span style="white-space:pre"></span>at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:300)<span style="white-space:pre"></span>at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)<span style="white-space:pre"></span>... 11 more

上網找了一下,有說是web.xml裡面的問題,比如filter和filter-mapping裡的filter-name不同名之類的。也有說是tomcat版本太高。
仔細找了下web.xml裡面確實沒問題。是否tomcat版本問題沒去驗證。最後發現是我忘了配置deployment assembly(右鍵項目名字-> properties -> myeclipse -> deployment assembly -> add -> java build path  entries -> maven dependencies)。OK,搞定。
寫下筆記做個備忘。也希望給用maven的朋友提供參考。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.