解决Tomcat启动时出现异常冗杂信息--Apache Portable Runtime and Tomcat
2007-12-15 23:03
501 查看
很多时候我们刚刚下载的tomcat在启动的时候会看到类似下面的冗杂信息:
2007-12-15 21:39:21 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: The Apache Tomcat Native library which allows optimal performance in produ
ction environments was not found on the java.library.path: D:jdk1.5.0_06/bin;.;
C:WINDOWSsystem32;C:WINDOWS;D:jdk1.5.0_06/bin;D:oracleora92/bin;C:Program
FilesOraclejre1.3.1/bin;C:Program FilesOraclejre1.1.8/bin;C:WINDOWSsys
tem32;C:WINDOWS;C:WINDOWSSystem32Wbem;C:Program FilesMicrosoft SQL Server
80ToolsBINN
发生这种情况是因为Tomcat建议使用apache的apr
解决办法:
到 http://tomcat.heanet.ie/native/ 下载编译好的 tcnative-1.dll 文件,目前最新为1.1.10,拷贝至jdk/bin下或Tomcat的bin目录下,重新启动Tomcat就可以成功加载APR了.
信息如下:
2007-12-15 22:48:30 org.apache.coyote.http11.Http11AprProtocol init
信息: Initializing Coyote HTTP/1.1 on http-8080
2007-12-15 22:48:30 org.apache.coyote.ajp.AjpAprProtocol init
信息: Initializing Coyote AJP/1.3 on ajp-8009
2007-12-15 22:48:30 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 1063 ms
2007-12-15 22:48:30 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2007-12-15 22:48:30 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/5.5.20
2007-12-15 22:48:30 org.apache.catalina.core.StandardHost start
.......................
官方信息可查阅:
地址: http://tomcat.apache.org/tomcat-5.5-doc/apr.html
Tomcat can use the Apache Portable Runtime to provide superior scalability, performance, and better integration with native server technologies. The Apache Portable Runtime is a highly portable library that is at the heart of Apache HTTP Server 2.x. APR has many uses, including access to advanced IO functionality (such as sendfile, epoll and OpenSSL), OS level functionality (random number generation, system status, etc), and native process handling (shared memory, NT pipes and Unix sockets).
These features allows making Tomcat a general purpose webserver, will enable much better integration with other native web technologies, and overall make Java much more viable as a full fledged webserver platform rather than simply a backend focused technology.
似乎是Tomcat 可以用 Apache Portable Runtime 来提供更强性能,提升Web静态页面的处理能力,
不再需要专门的Web Server来处理静态页面了。
但是APR的支持需要安装三个本地组件
APR support requires three main native components to be installed:
1、APR library
2、JNI wrappers for APR used by Tomcat (libtcnative)
3、OpenSSL libraries
解决:Windows下的安装配置与使用
1、先去 http://tomcat.heanet.ie/native/ 下载编译好的 tcnative-1.dll 文件,也可以下载tomcat-native.zip自己进行编译
2、修改一下 catalina.bat,加上
set CATALINA_OPTS="-Djava.library.path=../../APR/lib"
因为我把这个DLL放在与Tomcat目录同级的APR/lib目录下,所以采用了相对路径。或者把dll加到你的系统变量PATH里之类的,最简单的方法应当就是把tcnative-1.dll文件放在Tomcat的bin目录下
相关的性能测试结果可以参见:
http://www.javaworld.com.tw/jute/post/view?bid=9&id=139958&sty=3&age=0
2007-12-15 21:39:21 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: The Apache Tomcat Native library which allows optimal performance in produ
ction environments was not found on the java.library.path: D:jdk1.5.0_06/bin;.;
C:WINDOWSsystem32;C:WINDOWS;D:jdk1.5.0_06/bin;D:oracleora92/bin;C:Program
FilesOraclejre1.3.1/bin;C:Program FilesOraclejre1.1.8/bin;C:WINDOWSsys
tem32;C:WINDOWS;C:WINDOWSSystem32Wbem;C:Program FilesMicrosoft SQL Server
80ToolsBINN
发生这种情况是因为Tomcat建议使用apache的apr
解决办法:
到 http://tomcat.heanet.ie/native/ 下载编译好的 tcnative-1.dll 文件,目前最新为1.1.10,拷贝至jdk/bin下或Tomcat的bin目录下,重新启动Tomcat就可以成功加载APR了.
信息如下:
2007-12-15 22:48:30 org.apache.coyote.http11.Http11AprProtocol init
信息: Initializing Coyote HTTP/1.1 on http-8080
2007-12-15 22:48:30 org.apache.coyote.ajp.AjpAprProtocol init
信息: Initializing Coyote AJP/1.3 on ajp-8009
2007-12-15 22:48:30 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 1063 ms
2007-12-15 22:48:30 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2007-12-15 22:48:30 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/5.5.20
2007-12-15 22:48:30 org.apache.catalina.core.StandardHost start
.......................
官方信息可查阅:
地址: http://tomcat.apache.org/tomcat-5.5-doc/apr.html
Tomcat can use the Apache Portable Runtime to provide superior scalability, performance, and better integration with native server technologies. The Apache Portable Runtime is a highly portable library that is at the heart of Apache HTTP Server 2.x. APR has many uses, including access to advanced IO functionality (such as sendfile, epoll and OpenSSL), OS level functionality (random number generation, system status, etc), and native process handling (shared memory, NT pipes and Unix sockets).
These features allows making Tomcat a general purpose webserver, will enable much better integration with other native web technologies, and overall make Java much more viable as a full fledged webserver platform rather than simply a backend focused technology.
似乎是Tomcat 可以用 Apache Portable Runtime 来提供更强性能,提升Web静态页面的处理能力,
不再需要专门的Web Server来处理静态页面了。
但是APR的支持需要安装三个本地组件
APR support requires three main native components to be installed:
1、APR library
2、JNI wrappers for APR used by Tomcat (libtcnative)
3、OpenSSL libraries
解决:Windows下的安装配置与使用
1、先去 http://tomcat.heanet.ie/native/ 下载编译好的 tcnative-1.dll 文件,也可以下载tomcat-native.zip自己进行编译
2、修改一下 catalina.bat,加上
set CATALINA_OPTS="-Djava.library.path=../../APR/lib"
因为我把这个DLL放在与Tomcat目录同级的APR/lib目录下,所以采用了相对路径。或者把dll加到你的系统变量PATH里之类的,最简单的方法应当就是把tcnative-1.dll文件放在Tomcat的bin目录下
相关的性能测试结果可以参见:
http://www.javaworld.com.tw/jute/post/view?bid=9&id=139958&sty=3&age=0
相关文章推荐
- 在Eclipse关闭tomcat5.5的时候就会出现Failed shutdown of Apache Portable Runtime的问题的解决方法
- java.lang.NullPointerException at org.apache.jsp.**_jsp.jspInit(**_jsp.java)tomcat启动异常解决方法
- tomat在linux服务器上启动报The APR based Apache Tomcat Native library which allows ...java.library...异常解决方法
- 启动Tomcat出现org.apache.catalina.session.StandardManager doLoa错误解决方法
- [转]关于Apache Portable Runtime and Tomcat
- 解决mac上启动tomcat时出现Local host name unknown异常
- Tomcat 启动和关闭时关于Apache Portable Runtime的错误信息解决办法
- Tomcat maven 插件启动出现tomcat\conf\tomcat-users.xml cannot be read异常解决方法
- 出现 org.apache.tomcat.xxx.ClassFormatException: Invalid byte tag in constant pool: 15 异常的原因及解决方法
- 【解决】kettle启动时出现的Java Runtime Environment异常
- Tomcat 启动和关闭时关于Apache Portable Runtime的错误信息解决办法
- 关于Apache Portable Runtime and Tomcat
- Tomcat启动异常,控制台信息无法定位错误的解决方法
- 解决Window环境下启动Hadoop时出现的 org/apache/hadoop/util/PlatformName 异常
- 关于Apache Portable Runtime and Tomcat
- Apache Portable Runtime and Tomcat
- 关于eclipse 运行了 maven install后 在tomcat中启动web项目出现classnofind的异常解决方法
- 出现 org.apache.tomcat.util.bcel.classfile.ClassFormatException 异常的原因及解决方法
- tomcat 5.5启动时出现The Apache Tomcat Native library which allows optimal performance 错误的解决方法
- tomcat 启动时显示Portable Runtime was not found