2015-06-28 102 views
0

作爲一名新手,在eclipse mars中運行apache項目的apache tomcat 8.0沒有出現什麼問題。剛剛創建了一個動態Web項目和安裝在計算機上的Java 1.7和1.8(Windows 8)。我正在嘗試在eclipse上的struts 2中創建簡單的Web應用程序eclipse mars中的apache tomcat 8startup問題

SEVERE: A child container failed during start 
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/WebReports]] 
    at java.util.concurrent.FutureTask.report(Unknown Source) 
    at java.util.concurrent.FutureTask.get(Unknown Source) 
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:917) 
    at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:871) 
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) 
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409) 
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1399) 
    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: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/WebReports]] 
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154) 
    ... 6 more 
Caused by: java.lang.NoClassDefFoundError: Lcom/opensymphony/xwork2/util/logging/Logger; 
    at java.lang.Class.getDeclaredFields0(Native Method) 
    at java.lang.Class.privateGetDeclaredFields(Unknown Source) 
    at java.lang.Class.getDeclaredFields(Unknown Source) 
    at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:106) 
    at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:256) 
    at org.apache.catalina.startup.WebAnnotationSet.loadApplicationFilterAnnotations(WebAnnotationSet.java:105) 
    at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:64) 
    at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:334) 
    at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:774) 
    at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:305) 
    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:5066) 
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) 
    ... 6 more 
Caused by: java.lang.ClassNotFoundException: com.opensymphony.xwork2.util.logging.Logger 
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1305) 
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1157) 
    ... 20 more 

Jun 28, 2015 3:35:43 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(Unknown Source) 
    at java.util.concurrent.FutureTask.get(Unknown Source) 
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:917) 
    at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262) 
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) 
    at org.apache.catalina.core.StandardService.startInternal(StandardService.java:439) 
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) 
    at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:769) 
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) 
    at org.apache.catalina.startup.Catalina.start(Catalina.java:625) 
    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:351) 
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:485) 
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:1409) 
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1399) 
    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:925) 
    at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:871) 
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) 
    ... 6 more 

Jun 28, 2015 3:35:43 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:625) 
    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:351) 
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:485) 
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:769) 
    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:439) 
    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:925) 
    at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262) 
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) 
    ... 11 more 

Jun 28, 2015 3:35:43 PM org.apache.coyote.AbstractProtocol pause 
INFO: Pausing ProtocolHandler ["http-nio-8090"] 
Jun 28, 2015 3:35:43 PM org.apache.coyote.AbstractProtocol pause 
INFO: Pausing ProtocolHandler ["ajp-nio-8009"] 
Jun 28, 2015 3:35:43 PM org.apache.catalina.core.StandardService stopInternal 
INFO: Stopping service Catalina 
Jun 28, 2015 3:35:43 PM org.apache.coyote.AbstractProtocol destroy 
INFO: Destroying ProtocolHandler ["http-nio-8090"] 
Jun 28, 2015 3:35:43 PM org.apache.coyote.AbstractProtocol destroy 
SEVERE: Failed to destroy end point associated with ProtocolHandler ["http-nio-8090"] 
java.lang.NullPointerException 
    at org.apache.tomcat.util.net.NioEndpoint.releaseCaches(NioEndpoint.java:303) 
    at org.apache.tomcat.util.net.NioEndpoint.unbind(NioEndpoint.java:479) 
    at org.apache.tomcat.util.net.AbstractEndpoint.destroy(AbstractEndpoint.java:818) 
    at org.apache.coyote.AbstractProtocol.destroy(AbstractProtocol.java:532) 
    at org.apache.catalina.connector.Connector.destroyInternal(Connector.java:1023) 
    at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305) 
    at org.apache.catalina.core.StandardService.destroyInternal(StandardService.java:588) 
    at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305) 
    at org.apache.catalina.core.StandardServer.destroyInternal(StandardServer.java:859) 
    at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305) 
    at org.apache.catalina.startup.Catalina.start(Catalina.java:629) 
    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:351) 
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:485) 

Jun 28, 2015 3:35:43 PM org.apache.coyote.AbstractProtocol destroy 
INFO: Destroying ProtocolHandler ["ajp-nio-8009"] 
Jun 28, 2015 3:35:43 PM org.apache.coyote.AbstractProtocol destroy 
SEVERE: Failed to destroy end point associated with ProtocolHandler ["ajp-nio-8009"] 
java.lang.NullPointerException 
    at org.apache.tomcat.util.net.NioEndpoint.releaseCaches(NioEndpoint.java:303) 
    at org.apache.tomcat.util.net.NioEndpoint.unbind(NioEndpoint.java:479) 
    at org.apache.tomcat.util.net.AbstractEndpoint.destroy(AbstractEndpoint.java:818) 
    at org.apache.coyote.AbstractProtocol.destroy(AbstractProtocol.java:532) 
    at org.apache.catalina.connector.Connector.destroyInternal(Connector.java:1023) 
    at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305) 
    at org.apache.catalina.core.StandardService.destroyInternal(StandardService.java:588) 
    at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305) 
    at org.apache.catalina.core.StandardServer.destroyInternal(StandardServer.java:859) 
    at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305) 
    at org.apache.catalina.startup.Catalina.start(Catalina.java:629) 
    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:351) 
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:485) 
+0

你能解釋一下你如何整合tomcat,或者更準確地說你遵循了哪些步驟來使事情發揮作用? – conFusl

+0

我的猜測是它與此有關: '由:java.lang.ClassNotFoundException:com.opensymphony.xwork2.util.logging.Logger'引起。檢查你的依賴瓶。 –

+0

和@AlinPandichi一樣想!你能列出你的依賴關係嗎? – conFusl

回答

0

您的註釋是否正確?如果您在包含部分下更改了某些內容,可能會影響課程掃描。確保它看起來是這樣的:

@WebServlet("/HelloWord") 
public class HelloWorld extends HttpServlet { 
private static final long serialVersionUID = 1L; 

另外,如果你不是真的需要一個Tomcat 8的功能,嘗試安裝更穩定的版本7和再試一次。 如果您的應用程序的運行以及在Tomcat 7或6,添加

元數據的完整= 「真」

到你的web.xml。