Tomcat部署項目時出錯java.lang.IllegalStateException: ContainerBase.addChild: start:org.apache.catalina.Life

Tomcat部署項目時出錯java.lang.IllegalStateException: ContainerBase.addChild: start:org.apache.catalina.LifecycleException: Failed to start component[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/項目名]]


一個很是easy的項目。沒有出現編譯錯誤,從Eclipse中用Tomcat v7.0 server啓動出現下面錯誤,貌似不是項目自己的問題(如因爲庫沒有導入)。java

六月 10, 2015 2:02:50 下午 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[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
六月 10, 2015 2:02:50 下午 org.apache.coyote.AbstractProtocol pause
信息: Pausing ProtocolHandler [「http-bio-8080」]
六月 10, 2015 2:02:50 下午 org.apache.coyote.AbstractProtocol pause
信息: Pausing ProtocolHandler [「ajp-bio-8009」]
六月 10, 2015 2:02:50 下午 org.apache.catalina.core.StandardService stopInternal
信息: Stopping service Catalina
六月 10, 2015 2:02:50 下午 org.apache.coyote.AbstractProtocol destroy
信息: Destroying ProtocolHandler [「http-bio-8080」]
六月 10, 2015 2:02:50 下午 org.apache.coyote.AbstractProtocol destroy
信息: Destroying ProtocolHandler [「ajp-bio-8009」]web

把項目部署到tomcat文件夾下,用命令行啓動。報下面錯誤。
這裏寫圖片描寫敘述apache

因此可以確定得是是Tomcat容器在載入咱們servlet的時候出現的問題。因此重點檢查web.xml文件是否有問題:servlet是否都定義了,mapping映射是否認義正確….最後發現問題的本源在於servlet-name上下沒有相應
這裏寫圖片描寫敘述tomcat

相關文章
相關標籤/搜索