2013-09-26 293 views
0

當我在Eclipse啓動的Apache Tomcat Server7,它無法啓動:Apache Tomcat服務器無法啓動

錯誤日誌是:

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$Sync.innerGet(Unknown Source) 
    at java.util.concurrent.FutureTask.get(Unknown Source) 
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123) 
    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:691) 
    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:322) 
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:456) 
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$Sync.innerRun(Unknown Source) 
    at java.util.concurrent.FutureTask.run(Unknown Source) 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) 
    at java.lang.Thread.run(Unknown Source) 
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:800) 
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) 
    ... 7 more 

Sep 26, 2013 4:58:28 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:691) 
    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:322) 
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:456) 
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:1131) 
    at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:302) 
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) 
    ... 11 more 

而且我的pom.xml文件如下。我需要在這個任何的變化,以及 http://maven.apache.org/xsd/maven-4.0.0.xsd「> 4.0.0 springSecurityDemo springSecurityDemo 1.0 戰爭

<dependencies> 
     <!-- Spring 3 --> 
    <dependency> 
     <groupId>org.springframework</groupId> 
     <artifactId>spring-core</artifactId> 
     <version>3.0.5.RELEASE</version> 
    </dependency> 

    <dependency> 
     <groupId>org.springframework</groupId> 
     <artifactId>spring-web</artifactId> 
     <version>3.0.5.RELEASE</version> 
    </dependency> 
    <dependency> 
     <groupId>org.springframework</groupId> 
     <artifactId>spring-webmvc</artifactId> 
     <version>3.0.5.RELEASE</version> 
    </dependency> 

    <!-- Spring Security --> 
    <dependency> 
     <groupId>org.springframework.security</groupId> 
     <artifactId>spring-security-core</artifactId> 
     <version>3.0.5.RELEASE</version> 
    </dependency> 
    <dependency> 
     <groupId>org.springframework.security</groupId> 
     <artifactId>spring-security-web</artifactId> 
     <version>3.0.5.RELEASE</version> 
    </dependency> 
    <dependency> 
     <groupId>org.springframework.security</groupId> 
     <artifactId>spring-security-config</artifactId> 
     <version>3.0.5.RELEASE</version> 
    </dependency> 

    <!-- JSTL Dependancy --> 
    <dependency> 
     <groupId>javax.servlet</groupId> 
     <artifactId>jstl</artifactId> 
     <version>1.2</version> 
    </dependency> 

    <!-- for database connectivity --> 
    <dependency> 
     <groupId>org.springframework</groupId> 
     <artifactId>spring-jdbc</artifactId> 
     <version>3.0.5.RELEASE</version> 
    </dependency> 
    <dependency> 
     <groupId>mysql</groupId> 
     <artifactId>mysql-connector-java</artifactId> 
     <version>5.1.9</version> 
    </dependency> 

</dependencies> 

從這個

+1

可能的重複:http://stackoverflow.com/questions/10373077/tomcat-7-severe-a-child-container-failed-during-start –

回答

0

摘錄:Tomcat 7 "SEVERE: A child container failed during start"

當一個servlet 3.0應用啓動容器具有以掃描所有類的註解(除非元數據的完整=真)Tomcat使用叉子(無additi ons,只是未使用的代碼刪除)的Apache Commons BCEL來做這個掃描。網絡應用程序無法啓動,因爲BCEL遇到了不理解的內容。

如果應用程序在Tomcat 6上運行良好,則在web.xml中添加metadata-complete =「true」或在web.xml中將應用程序聲明爲2.5應用程序將停止註釋掃描。

目前,這看起來像是正在掃描的課程中的一個問題。然而,直到我們知道哪個班級導致問題並仔細觀察,我們纔會知道。我需要修改Tomcat來記錄一個更有用的錯誤消息,用來命名有問題的類。您可以按照這一點上的進度:https://issues.apache.org/bugzilla/show_bug.cgi?id=53161

+0

我已經給也是pom.xml文件。請看看那個呢?它需要任何改變嗎? –