Tomcat的配置错误。系统无法识别路径

时间:2017-03-08 05:09:01

标签: java eclipse apache tomcat

我似乎无法通过这个Catalina错误。我的配置肯定有问题,但我无法弄清楚它是什么。当我尝试从命令行运行此程序时,我得到“未正确定义CATALINA_HOME环境变量”。当我尝试在eclipse中运行时,Catalina错误会阻止服务器启动。当我尝试切换位置并直接指向CATALINA_HOME时,我收到此错误:

Publishing the configuration...
    Error copying file to C:/Program Files/Apache Software Foundation/apache-tomcat-8.5.11/backup\catalina.policy: C:\Program Files\Apache Software Foundation\apache-tomcat-8.5.11\backup\catalina.policy (The system cannot find the path specified)
    C:\Program Files\Apache Software Foundation\apache-tomcat-8.5.11\backup\catalina.policy (The system cannot find the path specified)
    Error copying file to C:/Program Files/Apache Software Foundation/apache-tomcat-8.5.11/backup\catalina.properties: C:\Program Files\Apache Software Foundation\apache-tomcat-8.5.11\backup\catalina.properties (The system cannot find the path specified)
    C:\Program Files\Apache Software Foundation\apache-tomcat-8.5.11\backup\catalina.properties (The system cannot find the path specified)
    Error copying file to C:/Program Files/Apache Software Foundation/apache-tomcat-8.5.11/backup\context.xml: C:\Program Files\Apache Software Foundation\apache-tomcat-8.5.11\backup\context.xml (The system cannot find the path specified)
    C:\Program Files\Apache Software Foundation\apache-tomcat-8.5.11\backup\context.xml (The system cannot find the path specified)
    Error copying file to C:/Program Files/Apache Software Foundation/apache-tomcat-8.5.11/backup\server.xml: C:\Program Files\Apache Software Foundation\apache-tomcat-8.5.11\backup\server.xml (The system cannot find the path specified)
    C:\Program Files\Apache Software Foundation\apache-tomcat-8.5.11\backup\server.xml (The system cannot find the path specified)
    Error copying file to C:/Program Files/Apache Software Foundation/apache-tomcat-8.5.11/backup\tomcat-users.xml: C:\Program Files\Apache Software Foundation\apache-tomcat-8.5.11\backup\tomcat-users.xml (The system cannot find the path specified)
    C:\Program Files\Apache Software Foundation\apache-tomcat-8.5.11\backup\tomcat-users.xml (The system cannot find the path specified)
    Error copying file to C:/Program Files/Apache Software Foundation/apache-tomcat-8.5.11/backup\web.xml: C:\Program Files\Apache Software Foundation\apache-tomcat-8.5.11\backup\web.xml (The system cannot find the path specified)
    C:\Program Files\Apache Software Foundation\apache-tomcat-8.5.11\backup\web.xml (The system cannot find the path specified)

当我使用单选按钮指向服务器概述窗口中的CATALINA_HOME时,出现相同的错误。

部分启动日志会产生以下错误:

Mar 07, 2017 11:15:07 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:167)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:655)
    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:355)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:495)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Catalina]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
    at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:793)
    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:167)
    at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
    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:947)
    at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    ... 11 more

我尝试使用tomcat-8.5-doc / RUNNING.txt重新配置Tomcat,结果没有任何区别。

以下是我的环境设置:

CATALINA_BASE = C:\ Program Files \ Apache Software Foundation \ apache-tomcat-8.5.11

CATALINA_HOME = C:\ Program Files \ Apache Software Foundation \ apache-tomcat-8.5.11

CLASS_PATH = C:\ Program Files \ Apache Software Foundation \ apache-tomcat-8.5.11 \ lib \ servlet-api.jar;              C:\ Program Files \ Java \ jdk1.8.0_121 \ bin; C:\ Program Files \ Java \ jre1.8.0_121 \ bin;              C:\ Program Files \ Java \ jre1.8.0_121 \ lib; C:\ Program Files \ Apache Software Foundation \ apache-tomcat-8.5.11 \ lib;。

JAVA_HOME = C:\ Program Files \ Java \ jdk1.8.0_121 \ bin

我真的很感激一些帮助。

0 个答案:

没有答案