Tomcat5.5启动时提示“The Apache Tomcat Native library which allows optimal performance in production environments was not found”

本文介绍了解决Tomcat启动时未找到Apache Portable Runtime (APR)的问题的方法。包括下载安装APR和Apache Tomcat Native library,以及如何设置环境变量以确保正确加载APR。


1.在tomcat5.5启动时可能会收到下面的信息:
Oct 30, 2006 11:54:51 AM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/local/jdk1.5.0_08/jre/lib/i386/server:/usr/local/jdk1.5.0_08/jre/lib/i386:/usr/local/jdk1.5.0_08/jre/../lib/i386
这表示没有找到APR,在tomcat文档中有对tomcat与apr的关系的描述,并说明了APR的好处,参考链接如下:
http://tomcat.apache.org/tomcat-5.5-doc/apr.html

2.到APACHE网站去下载APR并安装,链接:http://apr.apache.org/

3.安装Apache Tomcat Native library,在tomcat/bin的目录下可以找到这个native包,但版本为1.1.3,安装后再启动,会得到如下提示:
Oct 30, 2006 12:40:42 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: An older version 1.1.3 of the Apache Tomcat Native library is installed, while Tomcat recommends version greater than 1.1.4
因此可以到下面网站下载新版:http://tomcat.heanet.ie/native/,目前最新为1.1.6,

4.安装好后按照提示信息设置一下环境变量,再启动就可以成功加载APR了。 

2010-8-11 18:24:13 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\jre1.5.0_11\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\ATI Technologies\ATI Control Panel;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;D:\Java\jdk1.5.0_11\bin;D:\Tomcat 5.0\bin 2010-8-11 18:24:13 org.apache.coyote.http11.Http11BaseProtocol init 信息: Initializing Coyote HTTP/1.1 on http-8080 2010-8-11 18:24:13 org.apache.catalina.startup.Catalina load 信息: Initialization processed in 984 ms 2010-8-11 18:24:13 org.apache.catalina.core.StandardService start 信息: Starting service Catalina 2010-8-11 18:24:13 org.apache.catalina.core.StandardEngine start 信息: Starting Servlet Engine: Apache Tomcat/5.5.23 2010-8-11 18:24:13 org.apache.catalina.core.StandardHost start 信息: XML validation disabled 2010-8-11 18:24:13 org.apache.coyote.http11.Http11BaseProtocol start 信息: Starting Coyote HTTP/1.1 on http-8080 2010-8-11 18:24:13 org.apache.jk.common.ChannelSocket init 信息: JK: ajp13 listening on /0.0.0.0:8009 2010-8-11 18:24:13 org.apache.jk.server.JkMain start 信息: Jk running ID=0 time=0/187 config=null 2010-8-11 18:24:13 org.apache.catalina.storeconfig.StoreLoader load 信息: Find registry server-registry.xml at classpath resource 2010-8-11 18:24:13 org.apache.catalina.startup.Catalina start 信息: Server startup in 1235 ms 查了一下,需要一个apr支持,然后按提示去 下载 http://tomcat.heanet.ie/native/1.1.9/binaries/win32//tcnative-1.dll 将这个文件复制到C:WINDOWSsystem32下面 或者将这个文件放到Tomcat下的bin目录下 再启动tomcat,一切okay
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值