SEVERE: The required Server component failed to start so Tomcat is unable to start. org.apache.catalina.LifecycleException: Failed to start component
SEVERE: The required Server component failed to start so Tomcat is unable to start. org.apache.catalina.LifecycleException: Failed to start component [StandardServer[8005]]
之前在Eclipse上部署了Tomcat伺服器,今天在MyEclipse上部署,結果Tomcat啟動失敗,報錯。在網上搜了半天,有的說是因為埠被占用,有的說因為Tomcat的JDK版本不對。其實都不是。原因是Tomcat的server.xml配置文件最後多出來的這幾行,估計是以前在Eclipse上跑的項目自動生成的。把它們刪了之後Tomcat就正常運行了。
<Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true">
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" pattern="%h %l %u %t "%r" %s %b" prefix="localhost_access_log." suffix=".txt"/>
<Context docBase="MyProject" path="/MyProject" reloadable="true" source="org.eclipse.jst.jee.server:MyProject"/></Host>