2014-04-10 211 views
3

嘗試啓動tomcat時出現此錯誤。這可能是什麼原因?org.apache.catalina.LifecycleException:無法啓動組件[StandardEngine [Catalina] .StandardHost [localhost] .StandardContext []]

我已閱讀了一堆類似的帖子,我似乎無法找到任何幫助。據我所知,我不會錯過.jar文件。

SEVERE: A child container failed during start 
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]] 
    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:799) 
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) 
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) 
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) 
    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: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]] 
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154) 
    ... 6 more 
Caused by: java.lang.NoSuchMethodError: javax.servlet.ServletContext.getClassLoader()Ljava/lang/ClassLoader; 
    at org.apache.catalina.startup.WebappServiceLoader.load(WebappServiceLoader.java:90) 
    at org.apache.catalina.startup.ContextConfig.processServletContainerInitializers(ContextConfig.java:1543) 
    at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1265) 
    at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:873) 
    at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:371) 
    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:5355) 
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) 
    ... 6 more 

Apr 10, 2014 1:53:30 PM 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(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:731) 
    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:1559) 
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) 
    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 start 
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1131) 
    at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:799) 
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) 
    ... 6 more 

Apr 10, 2014 1:53:30 PM 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(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 [StandardService[Catalina]] 
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154) 
    at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:731) 
    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 

這裏是包含在我的項目的.jar文件:

annotations-api.jar  
el-api.jar   
robotium-solo-5.0.1.jar 
catalina-ant.jar   
gson-2.2.4-javadoc.jar  
servlet-api.jar 
catalina-ha.jar   
gson-2.2.4-sources.jar  
slf4j-api-1.7.5.jar 
catalina-tribes.jar  
gson-2.2.4.jar   
slf4j-api-1.7.6.jar 
catalina.jar    
jackson-core-asl-1.9.11.jar 
slf4j-log4j12-1.4.3.jar 
commons-io-2.4-javadoc.jar 
jackson-mapper-asl-1.9.11.jar 
tomcat-api.jar 
commons-io-2.4-sources.jar 
jasper-el.jar   
tomcat-coyote.jar 
commons-io-2.4-test-sources.jar 
jasper-runtime-5.5.12.jar 
tomcat-dbcp.jar 
commons-io-2.4-tests.jar  
jasper.jar   
tomcat-i18n-es.jar 
commons-io-2.4.jar  
json-path-0.9.0-javadoc.jar 
tomcat-i18n-fr.jar 
commons-lang3-3.3.1-javadoc.jar 
json-path-0.9.0-sources.jar 
tomcat-i18n-ja.jar 
commons-lang3-3.3.1.jar  
json-path-0.9.0.jar  
tomcat-jdbc.jar 
commons-logging-1.1.1.jar 
json-smart-1.2.jar  
tomcat-util.jar 
commons-logging-api-1.0.4.jar 
jsp-api.jar   
tomcat7-websocket.jar 
ecj-4.3.1.jar   
loremipsum-1.0.jar  
websocket-api.jar 

更新:

卸載並重新安裝tomcat的問題已經解決後。奇怪的。

+0

@drob刪除該帖子,轉貼,因爲我發佈後找不到它,所以我想我不知怎的沒有發佈它。下次我會在嘗試查找我提交的帖子之前等待。 – tylerjw

+2

您可以添加項目中包含的庫(和罐子)的屏幕截圖(或列表)嗎?您的web.xml(如果有很多映射嘗試縮短它)和JDK版本。 – Serhiy

+0

您的JDK是1.5+,並且在您的web.xml中版本屬性是2.5+?因爲問題似乎與某些圖書館衝突或配置錯誤有關。據我看到你的罐子,我無法找到它與圖書館衝突有關。 – Serhiy

回答

0

servlet-api.jar - 在您的應用程序庫列表中存在錯誤。 此jar文件(或evivalent)必須由servlet容器(Tomcat)提供。

0

我曾用「調用」在我的web.xml和太多調查後我發現,它不再後的Tomcat 6

刪除此調用,並映射所有/servlet/servlet.class該servlet。 servlet-mapping中的fully.qualified.name

相關問題