Tamcat启动时报错.

Tomcat启动是报错:
The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\jdk1.6.0_05\bin;D:\apache-tomcat-6.0.14\bin

详细错误如下:
2011-11-2 11:27:16 org.apache.catalina.core.AprLifecycleListener init
良好: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\jdk1.6.0_05\bin;D:\apache-tomcat-6.0.14\bin
java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.catalina.core.AprLifecycleListener.init(AprLifecycleListener.java:135)
	at org.apache.catalina.core.AprLifecycleListener.lifecycleEvent(AprLifecycleListener.java:80)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
	at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:767)
	at org.apache.catalina.startup.Catalina.load(Catalina.java:518)
	at org.apache.catalina.startup.Catalina.load(Catalina.java:538)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412)
Caused by: java.lang.UnsatisfiedLinkError: no tcnative-1 in java.library.path, no libtcnative-1 in java.library.path(D:\jdk1.6.0_05\bin;D:\apache-tomcat-6.0.14\bin)
	at org.apache.tomcat.jni.Library.<init>(Library.java:56)
	at org.apache.tomcat.jni.Library.initialize(Library.java:157)
	... 16 more

解决方法:
http://it.oyksoft.com/post/750/
在启动Tomcat 6.0时发现第一条信息便是:
The Apache Tomcat Native library which allows optimal performance in production environments was not found ……
解决方法:
相关文档:http://tomcat.apache.org/tomcat-6.0-doc/apr.html
去这里http://tomcat.heanet.ie/native/下载最新版本的tcnative-1.dll放到Tomcat的安装目录\Bin下
之后重启Tomcat就OK了。
比如现在我已下载了V1.1.14的tcnative-1.dll,启动时信息变成:
引用
信息: Loaded APR based Apache Tomcat Native library 1.1.14.

这个APR是什么作用呢?Tomcat 可以用 Apache Portable Runtime 来提供更强性能,提升Web静态页面的处理能力,不再需要专门的Web Server来处理静态页面了。

你可能感兴趣的:(cat)