今天启动tomcat5.5.28发现没有apr配置,报
[2010-04-20 17:33:19,734] [main] (AprLifecycleListener.java:99) DEBUG org.apache.catalina.core.AprLifecycleListener - The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\Sun\jdk1.5.0_19\bin;D:\develop_tools\apache-tomcat-5.5.28\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:585)
at org.apache.catalina.core.AprLifecycleListener.lifecycleEvent(AprLifecycleListener.java:83)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:757)
at org.apache.catalina.startup.Catalina.load(Catalina.java:504)
at org.apache.catalina.startup.Catalina.load(Catalina.java:524)
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:585)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:267)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
Caused by: java.lang.UnsatisfiedLinkError: no tcnative-1 in java.library.path, no libtcnative-1 in java.library.path(D:\Sun\jdk1.5.0_19\bin;D:\develop_tools\apache-tomcat-5.5.28\bin)
at org.apache.tomcat.jni.Library.<init>(Library.java:67)
at org.apache.tomcat.jni.Library.initialize(Library.java:168)
... 15 more
错误,然后去官方下载最新的tcnative-1.dll文件1.1.14版本,(注:tomcat6.0.26自己带最新的1.1.20版本,所以启动没有问题),(官方没有介绍tomcat的版本和tcnative-1.dll版本的对应关系)
下载放入$tomcat_home/bin后报错信息如下:
[2010-04-20 17:37:19,078] [main] (AprLifecycleListener.java:99) DEBUG org.apache.catalina.core.AprLifecycleListener - The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\Sun\jdk1.5.0_19\bin;D:\develop_tools\apache-tomcat-5.5.28\bin
java.lang.NoSuchFieldException: TCN_MAJOR_VERSION
at java.lang.Class.getField(Class.java:1507)
at org.apache.catalina.core.AprLifecycleListener.lifecycleEvent(AprLifecycleListener.java:91)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:757)
at org.apache.catalina.startup.Catalina.load(Catalina.java:504)
at org.apache.catalina.startup.Catalina.load(Catalina.java:524)
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:585)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:267)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
这种情况极有可能是tomcat在升级的时候修改了AprLifecycleListener类的实现,但不敢确定,所以我挨个下了所有版本的tcnative-1.dll做实验,结果都会出现上述的两种异常;
然后我查看了tomcat5.5.28官方的的channellog,有如下收获
http://tomcat.apache.org/tomcat-5.5-doc/changelog.html这是连接地址
其中有涉及到
|
39997: Add the SSLRandomSeed option to the AprLifecycleListener to enable faster starts on development systems. (markt)
点进去看发现确实针对linux修改了东西.
最后我下载了tomcat5.5.27版本,在$TOMCAT_HOMT/bin里放入了tcnative-1.dll文件1.1.14版本
启动一切正常,问题解决!
|
分享到:
相关推荐
tcnative-1.dll是Apache Tomcat服务器中一个重要的动态链接库文件,主要负责提供与操作系统交互的本机接口。在标题和描述中提到的"tcnative-1.dll 1.2.16下载 1.2.14可用",指的是这个库文件的两个版本,1.2.16和...
**tcnative-1.dll** 是一个重要的动态链接库文件,主要在Java应用程序中使用,特别是与Tomcat服务器相关的应用。这个文件是Tomcat Native库的一部分,由Apache软件基金会开发,目的是提高Apache Tomcat服务器的性能...
通常,下载对应版本的tcnative-1.dll库文件后,将其放置在Tomcat的`bin`目录下,然后在`catalina.properties`中添加或更新`java.library.path`指向该库的路径。 7. **测试与验证**: 升级后,务必进行充分的测试以...
3. **配置Tomcat**:在Tomcat的配置文件(如server.xml)中添加适当的设置,启用tcnative-1.dll的支持。 总的来说,1.1.32和1.1.33的64位tcnative-1.dll是针对64位操作系统的优化版本,它们旨在提供更高效、更稳定...
2. 解压缩,找到对应的平台库文件,如Windows下的tcnative-1.dll。 3. 将库文件放置到Tomcat服务器的bin目录下,或者设置系统环境变量指向库文件的位置。 4. 更新Tomcat的配置文件(如server.xml),启用tcnative,...
5. **安装步骤**:首先,下载对应系统架构的tcnative-1库,解压后编译并生成动态链接库(Windows上是.dll,Linux上是.so,macOS上是.dylib)。然后,将生成的库文件放到系统路径中,或者Tomcat的bin目录下。最后,...
启用APR需要安装相关库,并将`tcnative-1.dll`复制到JDK的`bin`目录下。 3. **Tomcat Connector运行模式**: - **BIO**:性能较差,不适用于高并发场景。 - **NIO**:提供非阻塞I/O,适合大多数应用场景。Tomcat ...