2016-02-11 214 views
0

我是全新的tomcat apache服務器,我試圖編譯我的一個web項目。出於某種原因,當我嘗試運行Tomcat服務器我得到以下錯誤:tomcat8服務器無法啓動錯誤

Server Tomcat v8.0 Server at localhost failed to start. 

我不從錯誤是什麼問題理解。

這是我的輸出控制檯:

Feb 11, 2016 12:08:42 AM org.apache.tomcat.util.digester.SetPropertiesRule begin 
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:myfirstjsp' did not find a matching property. 
Feb 11, 2016 12:08:42 AM org.apache.tomcat.util.digester.SetPropertiesRule begin 
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:RestApi' did not find a matching property. 
Feb 11, 2016 12:08:42 AM org.apache.tomcat.util.digester.SetPropertiesRule begin 
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.j2ee.server:springexample' did not find a matching property. 
Feb 11, 2016 12:08:42 AM org.apache.catalina.startup.VersionLoggerListener log 
INFO: Server version:  Apache Tomcat/8.0.30 
Feb 11, 2016 12:08:42 AM org.apache.catalina.startup.VersionLoggerListener log 
INFO: Server built:   Dec 1 2015 22:30:46 UTC 
Feb 11, 2016 12:08:42 AM org.apache.catalina.startup.VersionLoggerListener log 
INFO: Server number:   8.0.30.0 
Feb 11, 2016 12:08:42 AM org.apache.catalina.startup.VersionLoggerListener log 
INFO: OS Name:    Linux 
Feb 11, 2016 12:08:42 AM org.apache.catalina.startup.VersionLoggerListener log 
INFO: OS Version:   3.19.0-49-generic 
Feb 11, 2016 12:08:42 AM org.apache.catalina.startup.VersionLoggerListener log 
INFO: Architecture:   amd64 
Feb 11, 2016 12:08:42 AM org.apache.catalina.startup.VersionLoggerListener log 
INFO: Java Home:    /usr/lib/jvm/java-7-openjdk-amd64/jre 
Feb 11, 2016 12:08:42 AM org.apache.catalina.startup.VersionLoggerListener log 
INFO: JVM Version:   1.7.0_95-b00 
Feb 11, 2016 12:08:42 AM org.apache.catalina.startup.VersionLoggerListener log 
INFO: JVM Vendor:   Oracle Corporation 
Feb 11, 2016 12:08:42 AM org.apache.catalina.startup.VersionLoggerListener log 
INFO: CATALINA_BASE:   /home/matant/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0 
Feb 11, 2016 12:08:42 AM org.apache.catalina.startup.VersionLoggerListener log 
INFO: CATALINA_HOME:   /home/matant/apache-tomcat-8.0.30 
Feb 11, 2016 12:08:42 AM org.apache.catalina.startup.VersionLoggerListener log 
INFO: Command line argument: -Dcatalina.base=/home/matant/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0 
Feb 11, 2016 12:08:42 AM org.apache.catalina.startup.VersionLoggerListener log 
INFO: Command line argument: -Dcatalina.home=/home/matant/apache-tomcat-8.0.30 
Feb 11, 2016 12:08:42 AM org.apache.catalina.startup.VersionLoggerListener log 
INFO: Command line argument: -Dwtp.deploy=/home/matant/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps 
Feb 11, 2016 12:08:42 AM org.apache.catalina.startup.VersionLoggerListener log 
INFO: Command line argument: -Djava.endorsed.dirs=/home/matant/apache-tomcat-8.0.30/endorsed 
Feb 11, 2016 12:08:42 AM org.apache.catalina.startup.VersionLoggerListener log 
INFO: Command line argument: -Dfile.encoding=UTF-8 
Feb 11, 2016 12:08:42 AM org.apache.catalina.core.AprLifecycleListener lifecycleEvent 
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib 
Feb 11, 2016 12:08:42 AM org.apache.coyote.AbstractProtocol init 
INFO: Initializing ProtocolHandler ["http-nio-8080"] 
Feb 11, 2016 12:08:42 AM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector 
INFO: Using a shared selector for servlet write/read 
Feb 11, 2016 12:08:42 AM org.apache.coyote.AbstractProtocol init 
INFO: Initializing ProtocolHandler ["ajp-nio-8009"] 
Feb 11, 2016 12:08:42 AM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector 
INFO: Using a shared selector for servlet write/read 
Feb 11, 2016 12:08:42 AM org.apache.catalina.startup.Catalina load 
INFO: Initialization processed in 2575 ms 
Feb 11, 2016 12:08:43 AM org.apache.catalina.core.StandardService startInternal 
INFO: Starting service Catalina 
Feb 11, 2016 12:08:43 AM org.apache.catalina.core.StandardEngine startInternal 
INFO: Starting Servlet Engine: Apache Tomcat/8.0.30 
Feb 11, 2016 12:08:46 AM 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].StandardContext[/RestApi]] 
    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:916) 
    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:1408) 
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398) 
    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:745) 
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/RestApi]] 
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154) 
    ... 6 more 
Caused by: java.lang.NoClassDefFoundError: Lorg/apache/commons/logging/Log; 
    at java.lang.Class.getDeclaredFields0(Native Method) 
    at java.lang.Class.privateGetDeclaredFields(Class.java:2509) 
    at java.lang.Class.getDeclaredFields(Class.java:1819) 
    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.loadApplicationServletAnnotations(WebAnnotationSet.java:132) 
    at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:65) 
    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:95) 
    at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) 
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5154) 
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) 
    ... 6 more 
Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.Log 
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333) 
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1167) 
    ... 20 more 

Feb 11, 2016 12:08:47 AM org.apache.jasper.servlet.TldScanner scanJars 
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time. 
Feb 11, 2016 12:08:49 AM org.apache.jasper.servlet.TldScanner scanJars 
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time. 
Feb 11, 2016 12:08:49 AM org.apache.catalina.core.ApplicationContext log 
INFO: No Spring WebApplicationInitializer types detected on classpath 
Feb 11, 2016 12:08:49 AM org.apache.catalina.core.ApplicationContext log 
INFO: Initializing Spring FrameworkServlet 'mvc-dispatcher' 
Feb 11, 2016 12:08:49 AM org.springframework.web.servlet.DispatcherServlet initServletBean 
INFO: FrameworkServlet 'mvc-dispatcher': initialization started 
Feb 11, 2016 12:08:49 AM org.springframework.web.context.support.XmlWebApplicationContext prepareRefresh 
INFO: Refreshing WebApplicationContext for namespace 'mvc-dispatcher-servlet': startup date [Thu Feb 11 00:08:49 PST 2016]; root of context hierarchy 
Feb 11, 2016 12:08:50 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions 
INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/mvc-dispatcher-servlet.xml] 
Feb 11, 2016 12:08:51 AM org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping registerHandler 
INFO: Mapped URL path [/helloWorld/hello] onto handler 'helloWorldController' 
Feb 11, 2016 12:08:51 AM org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping registerHandler 
INFO: Mapped URL path [/helloWorld/hello.*] onto handler 'helloWorldController' 
Feb 11, 2016 12:08:51 AM org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping registerHandler 
INFO: Mapped URL path [/helloWorld/hello/] onto handler 'helloWorldController' 
Feb 11, 2016 12:08:51 AM org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping registerHandler 
INFO: Mapped URL path [/helloWorld/displayMessage/{msg}] onto handler 'helloWorldController' 
Feb 11, 2016 12:08:51 AM org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping registerHandler 
INFO: Mapped URL path [/helloWorld/displayMessage/{msg}.*] onto handler 'helloWorldController' 
Feb 11, 2016 12:08:51 AM org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping registerHandler 
INFO: Mapped URL path [/helloWorld/displayMessage/{msg}/] onto handler 'helloWorldController' 
Feb 11, 2016 12:08:51 AM org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping registerHandler 
INFO: Mapped URL path [/helloWorld/knainz] onto handler 'helloWorldController' 
Feb 11, 2016 12:08:51 AM org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping registerHandler 
INFO: Mapped URL path [/helloWorld/knainz.*] onto handler 'helloWorldController' 
Feb 11, 2016 12:08:51 AM org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping registerHandler 
INFO: Mapped URL path [/helloWorld/knainz/] onto handler 'helloWorldController' 
Feb 11, 2016 12:08:51 AM org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping registerHandler 
INFO: Mapped URL path [/helloWorld/func1] onto handler 'helloWorldController' 
Feb 11, 2016 12:08:51 AM org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping registerHandler 
INFO: Mapped URL path [/helloWorld/func1.*] onto handler 'helloWorldController' 
Feb 11, 2016 12:08:51 AM org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping registerHandler 
INFO: Mapped URL path [/helloWorld/func1/] onto handler 'helloWorldController' 
Feb 11, 2016 12:08:52 AM org.springframework.web.servlet.DispatcherServlet initServletBean 
INFO: FrameworkServlet 'mvc-dispatcher': initialization completed in 2896 ms 
Feb 11, 2016 12:08:52 AM 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:916) 
    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:441) 
    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(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: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:1408) 
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398) 
    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:745) 
Caused by: org.apache.catalina.LifecycleException: A child container failed during start 
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:924) 
    at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:871) 
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) 
    ... 6 more 

Feb 11, 2016 12:08:52 AM 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(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: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:441) 
    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:924) 
    at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262) 
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) 
    ... 11 more 

Feb 11, 2016 12:08:52 AM org.apache.coyote.AbstractProtocol pause 
INFO: Pausing ProtocolHandler ["http-nio-8080"] 
Feb 11, 2016 12:08:52 AM org.apache.coyote.AbstractProtocol pause 
INFO: Pausing ProtocolHandler ["ajp-nio-8009"] 
Feb 11, 2016 12:08:52 AM org.apache.catalina.core.StandardService stopInternal 
INFO: Stopping service Catalina 
Feb 11, 2016 12:08:52 AM org.apache.coyote.AbstractProtocol destroy 
INFO: Destroying ProtocolHandler ["http-nio-8080"] 
Feb 11, 2016 12:08:52 AM org.apache.coyote.AbstractProtocol destroy 
SEVERE: Failed to destroy end point associated with ProtocolHandler ["http-nio-8080"] 
java.lang.NullPointerException 
    at org.apache.tomcat.util.net.NioEndpoint.releaseCaches(NioEndpoint.java:305) 
    at org.apache.tomcat.util.net.NioEndpoint.unbind(NioEndpoint.java:481) 
    at org.apache.tomcat.util.net.AbstractEndpoint.destroy(AbstractEndpoint.java:823) 
    at org.apache.coyote.AbstractProtocol.destroy(AbstractProtocol.java:533) 
    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:589) 
    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(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:351) 
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:485) 

Feb 11, 2016 12:08:52 AM org.apache.coyote.AbstractProtocol destroy 
INFO: Destroying ProtocolHandler ["ajp-nio-8009"] 
Feb 11, 2016 12:08:52 AM 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:305) 
    at org.apache.tomcat.util.net.NioEndpoint.unbind(NioEndpoint.java:481) 
    at org.apache.tomcat.util.net.AbstractEndpoint.destroy(AbstractEndpoint.java:823) 
    at org.apache.coyote.AbstractProtocol.destroy(AbstractProtocol.java:533) 
    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:589) 
    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(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:351) 
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:485) 

Feb 11, 2016 12:08:52 AM org.apache.catalina.core.ApplicationContext log 
INFO: Destroying Spring FrameworkServlet 'mvc-dispatcher' 
Feb 11, 2016 12:08:52 AM org.springframework.web.context.support.XmlWebApplicationContext doClose 
INFO: Closing WebApplicationContext for namespace 'mvc-dispatcher-servlet': startup date [Thu Feb 11 00:08:49 PST 2016]; root of context hierarchy 

回答

1

錯誤似乎在這裏造成的:

java.lang.ClassNotFoundException: org.apache.commons.logging.Log 

看來你忘了,包括下議院在您的應用程序項目記錄JAR。

+0

你知道我該如何解決這個問題? –

+0

看看您的webcontent-> WEB-INF/lib文件夾中是否有JAR。如果沒有,請從https://commons.apache.org/proper/commons-logging/下載 –

1

,如果你還沒有解決這個問題,按照這個...

前)我的win7的帳戶名是JHTA

C:\用戶\ JHTA.m2 \庫

所有文件刪除並重新啓動eclipse或STS。

正在等待下載構建過程。

修復IT!

相關問題