重装myeclipse后,启动不了tomcat,报Catalina.start: LifecycleException
Starting service Tomcat-Standalone
Apache Tomcat/4.1.31
Catalina.start: LifecycleException:
Context startup failed due to previous errorsLifecycleException: Context startup failed due to previous errors
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3578)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1141)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:707)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1141)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:316)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2143)
at org.apache.catalina.startup.Catalina.start(Catalina.java:463)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:350)
at org.apache.catalina.startup.Catalina.process(Catalina.java:129)
at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:156)
Stopping service Tomcat-Standalone
Catalina.stop: LifecycleException: Coyote connector has not been started
LifecycleException: Coyote connector has not been started
at org.apache.coyote.tomcat4.CoyoteConnector.stop(CoyoteConnector.java:1296)
at org.apache.catalina.core.StandardService.stop(StandardService.java:499)
at org.apache.catalina.core.StandardServer.stop(StandardServer.java:2178)
at org.apache.catalina.startup.Catalina.start(Catalina.java:494)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:350)
at org.apache.catalina.startup.Catalina.process(Catalina.java:129)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:156)
------解决方案--------------------我的异常网推荐解决方案:java环境变量设置------解决方案--------------------
你应该配一下,环境变量再试一试!
我的电脑以前也出现过类似的问题的,结果我配了环境变量后,就好了,现在用的可应手了
JAVA_HOME指明JDK安装路径,就是刚才安装时所选择的路径C:\Program Files\Java\jdk1.5.0_08,此路径下包括lib,bin,jre等文件夹(此变量最好设置,因为以后运行tomcat,eclipse等都需要依靠此变量)
PATH 使得系统可以在任何路径下识别java命令,设为:
%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin
CLASSP_ATH为java加载类(class or lib)路径,只有类在classpath中,java命令才能识别,设为:
.;%JAVA_HOME%\lib;%JAVA_HOME%\lib\tools.jar (要加.表示当前路径)
%JAVA_HOME%就是引用前面指定的JAVA_HOME
测试环境变量:开始” ? “运行” 键入 “cmd”,键入命令 “java -version”
如果出现汉字“Java不是内部命令”表示失败,反之则成功
如果不成功,请您查看您的JDK安装路径是否输入正确!
谢谢