tomcat在ecilpse下启动错误

一、控制台输出
2011-7-24 10:54:36 org.apache.catalina.core.AprLifecycleListener init
信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\Program Files\Java\jre1.6.0_02\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;D:/Program Files/Java/jre1.6.0_02/bin/client;D:/Program Files/Java/jre1.6.0_02/bin;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\ThinkPad\Bluetooth Software\;C:\Program Files\Broadcom\WHL\;C:\Program Files\Intel\Services\IPT\;C:\Program Files\Common Files\Lenovo;C:\Program Files\Windows Live\Shared;C:\SWTOOLS\ReadyApps;D:\Program Files\Java\jdk1.6.0_02\bin
2011-7-24 10:54:36 org.apache.coyote.http11.Http11BaseProtocol init
信息: Initializing Coyote HTTP/1.1 on http-8080
2011-7-24 10:54:36 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 404 ms
2011-7-24 10:54:36 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2011-7-24 10:54:36 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/5.5.33
2011-7-24 10:54:36 org.apache.catalina.core.StandardHost start
信息: XML validation disabled
2011-7-24 10:54:36 org.apache.coyote.http11.Http11BaseProtocol start
信息: Starting Coyote HTTP/1.1 on http-8080
2011-7-24 10:54:36 org.apache.jk.common.ChannelSocket init
信息: JK: ajp13 listening on /0.0.0.0:8009
2011-7-24 10:54:36 org.apache.jk.server.JkMain start
信息: Jk running ID=0 time=0/21  config=null
2011-7-24 10:54:36 org.apache.catalina.storeconfig.StoreLoader load
信息: Find registry server-registry.xml at classpath resource
2011-7-24 10:54:36 org.apache.catalina.startup.Catalina start
信息: Server startup in 403 ms

解决方法:将Tomcat  /bin目录下的tcnative-1.dll文件复制到%JAVA_HOME%\bin目录下,重启tomcat 控制台会输出如下信息:

2011-7-24 11:01:49 org.apache.catalina.core.AprLifecycleListener init
信息: Loaded APR based Apache Tomcat Native library 1.1.20.
2011-7-24 11:01:49 org.apache.catalina.core.AprLifecycleListener init
信息: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
2011-7-24 11:01:50 org.apache.coyote.http11.Http11AprProtocol init
信息: Initializing Coyote HTTP/1.1 on http-8080
2011-7-24 11:01:50 org.apache.coyote.ajp.AjpAprProtocol init
信息: Initializing Coyote AJP/1.3 on ajp-8009
2011-7-24 11:01:50 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 985 ms
2011-7-24 11:01:50 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2011-7-24 11:01:50 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/5.5.33
2011-7-24 11:01:50 org.apache.catalina.core.StandardHost start
信息: XML validation disabled
2011-7-24 11:01:50 org.apache.coyote.http11.Http11AprProtocol start
信息: Starting Coyote HTTP/1.1 on http-8080
2011-7-24 11:01:50 org.apache.coyote.ajp.AjpAprProtocol start
信息: Starting Coyote AJP/1.3 on ajp-8009
2011-7-24 11:01:50 org.apache.catalina.storeconfig.StoreLoader load
信息: Find registry server-registry.xml at classpath resource
2011-7-24 11:01:50 org.apache.catalina.startup.Catalina start
信息: Server startup in 309 ms

再看服务器的启动状态一直是处于starting状态,一段时间会报:Server Tomcat v5.5 Server at localhost was unable to start within 45 seconds. If the server requires more time, try increasing the timeout in the server editor.错误。这是server locations 设置的问题,双击Servers窗口下的服务器配置,选定server locations的Use tomcat installation,保存设置重启服务器。

你可能感兴趣的:(tomcat)