1. 在tomcat5.5啟動(dòng)時(shí)可能會(huì)收到下面的信息:
2006-1-26 19:44:11 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\Java\jdk1.5.0_05\bin;D:\Program Files\Apache Software Foundation\Tomcat 5.5\bin
這表示沒有找到APR,在tomcat文檔中有對(duì)tomcat與apr的關(guān)系的描述,并說(shuō)明了APR的好處,參考鏈接如下:http://tomcat.apache.org/tomcat-5.5-doc/apr.html。
2. 到APACHE網(wǎng)站去下載APR并將這個(gè)文件復(fù)制到C:\WINDOWS\system32\下面,鏈接:http://apr.apache.org/。
需要注意的是:在下載給定的文件的時(shí)候一定要根據(jù)自己的Tomcat的版本來(lái)選擇適當(dāng)?shù)?/span>.dll文件。
3. 安裝Apache Tomcat Native library,在tomcat/bin的目錄下可以找到這個(gè)native包,但版本為1.1.3,安裝后再啟動(dòng),會(huì)得到如下提示:
Oct 30, 2006 12:40:42 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: An older version 1.1.3 of the Apache Tomcat Native library is installed, while Tomcat recommends version greater than 1.1.4
因此可以到下面網(wǎng)站下載新版:http://tomcat.heanet.ie/native/,目前最新為1.1.6。
4. 安裝好后按照提示信息設(shè)置一下環(huán)境變量,再啟動(dòng)tomcat就可以成功加載APR了,就會(huì)發(fā)現(xiàn)tomcat 的控制臺(tái)信息為:
2006-1-26 19:48:42 org.apache.coyote.http11.Http11AprProtocol init
信息: Initializing Coyote HTTP/1.1 on http-8080
最新解決方案如下:
所謂的Apache Tomcat Native library其實(shí)叫APR,全稱為:Apache Portable Runtime and Tomcat。可以通過(guò)下面地址訪問:http://tomcat.apache.org/tomcat-5.5-doc/apr.html
用于Windows的APR是一個(gè)名稱為:tcnative-1.dll 的文件,下載地址:http://tomcat.heanet.ie/native/,目前最新版本是1.1.9。
把這個(gè) tcnative-1.dll 文件放到<$JAVA_HOME>/bin下,重啟Tomcat,剛才的提示不見了,看來(lái)OK了:
2007-10-11 0:30:56 org.apache.coyote.http11.Http11AprProtocol init
信息: Initializing Coyote HTTP/1.1 on http-8080
posted on 2009-01-14 10:19
飛翔天使 閱讀(6186)
評(píng)論(0) 編輯 收藏 所屬分類:
Tomcat