APACHE TOMCAT 服务器未启动
Posted
技术标签:
【中文标题】APACHE TOMCAT 服务器未启动【英文标题】:APACHE TOMCAT SERVER NOT STARTING 【发布时间】:2018-08-26 05:59:47 【问题描述】:以前它显示端口号错误。然后我更改了端口号,但过了一段时间它为启动服务器提供了一个新的例外。我从 ECLIPSE 中多次附加和删除服务器,但问题没有解决。
我还重新安装了 ECLIPSE,但例外仍然相同。
控制台上的错误是:
Mar 17, 2018 11:25:53 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server version: Apache Tomcat/9.0.5
Mar 17, 2018 11:25:53 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server built: Feb 6 2018 21:42:23 UTC
Mar 17, 2018 11:25:53 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server number: 9.0.5.0
Mar 17, 2018 11:25:53 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Name: Windows 10
Mar 17, 2018 11:25:53 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Version: 10.0
Mar 17, 2018 11:25:53 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Architecture: amd64
Mar 17, 2018 11:25:53 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Java Home: C:\Program Files\Java\jre1.8.0_131
Mar 17, 2018 11:25:53 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Version: 1.8.0_131-b11
Mar 17, 2018 11:25:53 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Vendor: Oracle Corporation
Mar 17, 2018 11:25:53 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_BASE: C:\Users\kc\eclipse-workspace-new\.metadata\.plugins\org.eclipse.wst.server.core\tmp1
Mar 17, 2018 11:25:53 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_HOME: I:\software\apatche tomcat server for eclipse\apache-tomcat-9.0.5
Mar 17, 2018 11:25:53 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.base=C:\Users\kc\eclipse-workspace-new\.metadata\.plugins\org.eclipse.wst.server.core\tmp1
Mar 17, 2018 11:25:53 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.home=I:\software\apatche tomcat server for eclipse\apache-tomcat-9.0.5
Mar 17, 2018 11:25:53 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dwtp.deploy=C:\Users\kc\eclipse-workspace-new\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps
Mar 17, 2018 11:25:53 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.endorsed.dirs=I:\software\apatche tomcat server for eclipse\apache-tomcat-9.0.5\endorsed
Mar 17, 2018 11:25:53 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dfile.encoding=Cp1252
Mar 17, 2018 11:25:53 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: [C:\Program Files\Java\jre1.8.0_131\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Program Files/Java/jre1.8.0_131/bin/server;C:/Program Files/Java/jre1.8.0_131/bin;C:/Program Files/Java/jre1.8.0_131/lib/amd64;C:\ProgramData\Oracle\Java\javapath;C:\Program Files\Java\jdk1.8.0_131\bin;C:\Program Files\Java\jre1.8.0_131\bin;C:\Users\kc\AppData\Local\Microsoft\WindowsApps;;C:\Users\kc\Desktop;;.]
Mar 17, 2018 11:25:53 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-nio-8080"]
Mar 17, 2018 11:25:54 AM org.apache.tomcat.util.net.NioselectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
Mar 17, 2018 11:25:54 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-nio-8009"]
Mar 17, 2018 11:25:54 AM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
Mar 17, 2018 11:25:54 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1565 ms
Mar 17, 2018 11:25:54 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service [Catalina]
Mar 17, 2018 11:25:54 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/9.0.5
Mar 17, 2018 11:25:54 AM org.apache.tomcat.util.descriptor.DigesterFactory locationFor
WARNING: The XML schema [web-jsptaglibrary_1_1.dtd] could not be found. This is very likely to break XML validation if XML validation is enabled.
Mar 17, 2018 11:25:54 AM org.apache.tomcat.util.descriptor.DigesterFactory locationFor
WARNING: The XML schema [web-jsptaglibrary_1_2.dtd] could not be found. This is very likely to break XML validation if XML validation is enabled.
Mar 17, 2018 11:25:54 AM org.apache.tomcat.util.descriptor.DigesterFactory locationFor
WARNING: The XML schema [web-jsptaglibrary_2_0.xsd] could not be found. This is very likely to break XML validation if XML validation is enabled.
Mar 17, 2018 11:25:54 AM org.apache.tomcat.util.descriptor.DigesterFactory locationFor
WARNING: The XML schema [jsp_2_0.xsd] could not be found. This is very likely to break XML validation if XML validation is enabled.
Mar 17, 2018 11:25:54 AM org.apache.tomcat.util.descriptor.DigesterFactory locationFor
WARNING: The XML schema [web-jsptaglibrary_2_1.xsd] could not be found. This is very likely to break XML validation if XML validation is enabled.
Mar 17, 2018 11:25:54 AM org.apache.tomcat.util.descriptor.DigesterFactory locationFor
WARNING: The XML schema [jsp_2_1.xsd] could not be found. This is very likely to break XML validation if XML validation is enabled.
Mar 17, 2018 11:25:54 AM org.apache.tomcat.util.descriptor.DigesterFactory locationFor
WARNING: The XML schema [jsp_2_2.xsd] could not be found. This is very likely to break XML validation if XML validation is enabled.
Mar 17, 2018 11:25:54 AM org.apache.tomcat.util.descriptor.DigesterFactory locationFor
WARNING: The XML schema [web-app_3_1.xsd] could not be found. This is very likely to break XML validation if XML validation is enabled.
Mar 17, 2018 11:25:54 AM org.apache.tomcat.util.descriptor.DigesterFactory locationFor
WARNING: The XML schema [web-fragment_3_1.xsd] could not be found. This is very likely to break XML validation if XML validation is enabled.
Mar 17, 2018 11:25:54 AM org.apache.tomcat.util.descriptor.DigesterFactory locationFor
WARNING: The XML schema [web-common_3_1.xsd] could not be found. This is very likely to break XML validation if XML validation is enabled.
Mar 17, 2018 11:25:54 AM org.apache.tomcat.util.descriptor.DigesterFactory locationFor
WARNING: The XML schema [javaee_7.xsd] could not be found. This is very likely to break XML validation if XML validation is enabled.
Mar 17, 2018 11:25:54 AM org.apache.tomcat.util.descriptor.DigesterFactory locationFor
WARNING: The XML schema [jsp_2_3.xsd] could not be found. This is very likely to break XML validation if XML validation is enabled.
Mar 17, 2018 11:25:54 AM org.apache.tomcat.util.descriptor.DigesterFactory locationFor
WARNING: The XML schema [javaee_web_services_1_4.xsd] could not be found. This is very likely to break XML validation if XML validation is enabled.
Mar 17, 2018 11:25:54 AM org.apache.tomcat.util.descriptor.DigesterFactory locationFor
WARNING: The XML schema [javaee_web_services_client_1_4.xsd] could not be found. This is very likely to break XML validation if XML validation is enabled.
Mar 17, 2018 11:25:54 AM org.apache.tomcat.util.descriptor.DigesterFactory locationFor
WARNING: The XML schema [web-app_4_0.xsd] could not be found. This is very likely to break XML validation if XML validation is enabled.
Mar 17, 2018 11:25:54 AM org.apache.tomcat.util.descriptor.DigesterFactory locationFor
WARNING: The XML schema [web-fragment_4_0.xsd] could not be found. This is very likely to break XML validation if XML validation is enabled.
Mar 17, 2018 11:25:54 AM org.apache.tomcat.util.descriptor.DigesterFactory locationFor
WARNING: The XML schema [web-common_4_0.xsd] could not be found. This is very likely to break XML validation if XML validation is enabled.
Mar 17, 2018 11:25:54 AM org.apache.tomcat.util.descriptor.DigesterFactory locationFor
WARNING: The XML schema [javaee_8.xsd] could not be found. This is very likely to break XML validation if XML validation is enabled.
Mar 17, 2018 11:25:54 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[]]
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:947)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:839)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1425)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1415)
at java.util.concurrent.FutureTask.run(Unknown Source)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.util.concurrent.AbstractExecutorService.submit(Unknown Source)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:941)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:258)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:770)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.startup.Catalina.start(Catalina.java:682)
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:353)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:493)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:441)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1425)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1415)
at java.util.concurrent.FutureTask.run(Unknown Source)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.util.concurrent.AbstractExecutorService.submit(Unknown Source)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:941)
... 21 more
Caused by: java.lang.NoClassDefFoundError: javax/websocket/DeploymentException
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.apache.catalina.startup.WebappServiceLoader.loadServices(WebappServiceLoader.java:188)
at org.apache.catalina.startup.WebappServiceLoader.load(WebappServiceLoader.java:159)
at org.apache.catalina.startup.ContextConfig.processServletContainerInitializers(ContextConfig.java:1660)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1137)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:774)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:299)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4997)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
... 27 more
Caused by: java.lang.ClassNotFoundException: javax.websocket.DeploymentException
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 38 more
Mar 17, 2018 11:25:54 AM org.apache.catalina.core.ContainerBase startInternal
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: A child container failed during start
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:947)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:258)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:770)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.startup.Catalina.start(Catalina.java:682)
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:353)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:493)
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:956)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:839)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1425)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1415)
at java.util.concurrent.FutureTask.run(Unknown Source)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.util.concurrent.AbstractExecutorService.submit(Unknown Source)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:941)
... 13 more
Mar 17, 2018 11:25:54 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: A child container failed during start
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:956)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:258)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:770)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.startup.Catalina.start(Catalina.java:682)
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:353)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:493)
Mar 17, 2018 11:25:54 AM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["http-nio-8080"]
Mar 17, 2018 11:25:54 AM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["ajp-nio-8009"]
Mar 17, 2018 11:25:54 AM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service [Catalina]
Mar 17, 2018 11:25:54 AM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["http-nio-8080"]
Mar 17, 2018 11:25:54 AM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["ajp-nio-8009"]
【问题讨论】:
发布错误截图 请先修复您的 CAPS LOCK! 请阅读Under what circumstances may I add “urgent” or other similar phrases to my question, in order to obtain faster answers? - 总结是这不是解决志愿者的理想方式,并且可能会适得其反。请不要将此添加到您的问题中。 Where to find javax.websocket .jars for use in project的可能重复 Tomcat throwing javax.websocket.DeploymentException 的可能重复项,也可以通过简单的 Google 搜索发现。 【参考方案1】:检查您的堆栈跟踪,因为这暗示了您面临的问题。答案将围绕这部分:
Caused by: java.lang.ClassNotFoundException: javax.websocket.DeploymentException
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 38 more
似乎您缺少一些 Tomcat 启动所需的依赖项。 Javadoc 异常的定义应该为解决这个问题提供更多见解:
https://docs.oracle.com/javase/7/docs/api/java/lang/ClassNotFoundException.html
你确定所有的 jar 文件都包含 Tomcat 所需的所有文件吗?另外,我强烈建议编辑您的原始问题,去掉大写字母并解决所有措辞问题,以使其更具可读性。
【讨论】:
(这看起来很有帮助,但我倾向于鼓励将元建议作为评论单独发布。这是因为 OP 或其他人有望解决帖子中的问题,留下用对未来读者无用的过时信息回答)。 我会这样做,但评论部分不允许使用很多字符,最重要的是它不允许(或者我还没有找到如何做到这一点)正确的代码语法。 根据你和tomcat关联的jar文件告诉我以上是关于APACHE TOMCAT 服务器未启动的主要内容,如果未能解决你的问题,请参考以下文章