localhost上的Tomcat服务器v8无法启动

时间:2016-09-30 11:05:45

标签: java eclipse tomcat8

I am able to deploy my application in web apps folder in tomcat server and everything is working fine.But while running the same application in eclipse it gives me lots of Exceptions.This application was working fine till yesterday.But don't know why it is not working today.
This is the exception I am getting.

如何解决此问题,我可以运行其他应用程序。我错了,我无法识别。是否有任何我失踪的配置。

java.lang.NoClassDefFoundError:Lorg / apache / log4j / Logger-此异常是此问题的根本原因以及我如何解决它。     严重:子容器在启动时失败     java.util.concurrent.ExecutionException:org.apache.catalina.LifecycleException:无法启动组件[StandardEngine [Catalina] .StandardHost [localhost] .StandardContext [/ Demo]]         at java.util.concurrent.FutureTask.report(FutureTask.java:122)         在java.util.concurrent.FutureTask.get(FutureTask.java:192)         在org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:915)         在org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:871)         在org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)         在org.apache.catalina.core.ContainerBase $ StartChild.call(ContainerBase.java:1407)         在org.apache.catalina.core.ContainerBase $ StartChild.call(ContainerBase.java:1397)         at java.util.concurrent.FutureTask.run(FutureTask.java:266)         在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)         at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:617)         在java.lang.Thread.run(Thread.java:745)     引起:org.apache.catalina.LifecycleException:无法启动组件[StandardEngine [Catalina] .StandardHost [localhost] .StandardContext [/ Demo]]         在org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:153)         ......还有6个     引起:java.lang.NoClassDefFoundError:Lorg / apache / log4j / Logger;         at java.lang.Class.getDeclaredFields0(Native Method)         at java.lang.Class.privateGetDeclaredFields(Class.java:2583)         at java.lang.Class.getDeclaredFields(Class.java:1916)         在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.loadApplicationListenerAnnotations(WebAnnotationSet.java:86)         在org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:63)         在org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:335)         在org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:782)         在org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:306)         在org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:95)         在org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)         at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5202)         在org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)         ......还有6个     引起:java.lang.ClassNotFoundException:org.apache.log4j.Logger         在org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1332)         在org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1166)         ......还有20个

Oct 04, 2016 2:40:26 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:192)
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:915)
    at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
    at org.apache.catalina.core.StandardService.startInternal(StandardService.java:441)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
    at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:787)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:629)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    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:153)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1407)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1397)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    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:923)
    at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:871)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
    ... 6 more

Oct 04, 2016 2:40:26 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:153)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:629)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    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:153)
    at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:787)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
    ... 7 more
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:153)
    at org.apache.catalina.core.StandardService.startInternal(StandardService.java:441)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
    ... 9 more
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:923)
    at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
    ... 11 more

Oct 04, 2016 2:40:26 PM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["http-nio-8080"]
Oct 04, 2016 2:40:26 PM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["ajp-nio-8009"]
Oct 04, 2016 2:40:26 PM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Catalina
Oct 04, 2016 2:40:26 PM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["http-nio-8080"]
Oct 04, 2016 2:40:26 PM 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:316)
    at org.apache.tomcat.util.net.NioEndpoint.unbind(NioEndpoint.java:492)
    at org.apache.tomcat.util.net.AbstractEndpoint.destroy(AbstractEndpoint.java:821)
    at org.apache.coyote.AbstractProtocol.destroy(AbstractProtocol.java:534)
    at org.apache.catalina.connector.Connector.destroyInternal(Connector.java:1023)
    at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:297)
    at org.apache.catalina.core.StandardService.destroyInternal(StandardService.java:589)
    at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:297)
    at org.apache.catalina.core.StandardServer.destroyInternal(StandardServer.java:877)
    at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:297)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:633)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:351)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:485)

Oct 04, 2016 2:40:26 PM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["ajp-nio-8009"]
Oct 04, 2016 2:40:26 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:316)
    at org.apache.tomcat.util.net.NioEndpoint.unbind(NioEndpoint.java:492)
    at org.apache.tomcat.util.net.AbstractEndpoint.destroy(AbstractEndpoint.java:821)
    at org.apache.coyote.AbstractProtocol.destroy(AbstractProtocol.java:534)
    at org.apache.catalina.connector.Connector.destroyInternal(Connector.java:1023)
    at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:297)
    at org.apache.catalina.core.StandardService.destroyInternal(StandardService.java:589)
    at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:297)
    at org.apache.catalina.core.StandardServer.destroyInternal(StandardServer.java:877)
    at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:297)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:633)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:351)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:485)

Oct 04, 2016 2:40:26 PM org.apache.catalina.deploy.NamingResourcesImpl cleanUp
WARNING: Failed to retrieve JNDI naming context for container [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/Demo]] so no cleanup was performed for that container
javax.naming.NamingException: No naming context bound to this class loader
    at org.apache.naming.ContextBindings.getClassLoader(ContextBindings.java:258)
    at org.apache.catalina.deploy.NamingResourcesImpl.cleanUp(NamingResourcesImpl.java:992)
    at org.apache.catalina.deploy.NamingResourcesImpl.stopInternal(NamingResourcesImpl.java:975)
    at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:224)
    at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5540)
    at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:224)
    at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:263)
    at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:832)
    at org.apache.catalina.core.ContainerBase.destroyInternal(ContainerBase.java:1012)
    at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:297)
    at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:832)
    at org.apache.catalina.core.ContainerBase.destroyInternal(ContainerBase.java:1012)
    at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:297)
    at org.apache.catalina.core.StandardService.destroyInternal(StandardService.java:604)
    at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:297)
    at org.apache.catalina.core.StandardServer.destroyInternal(StandardServer.java:877)
    at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:297)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:633)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:351)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:485)

0 个答案:

没有答案