When I moved from the old server to the new server today, tomcat reported an error:
严重: Failed to initialize connector [Connector[HTTP/1.1-9001]] org.apache.catalina.LifecycleException: Failed to initialize component [Connector[HTTP/1.1-9001]] at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:106) at org.apache.catalina.core.StandardService.initInternal (StandardService.java:559) at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102) at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:821) at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102) at org.apache.catalina.startup.Catalina.load(Catalina.java:638) at org.apache.catalina.startup.Catalina.load(Catalina.java:663) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:253) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:427) Caused by: org.apache.catalina.LifecycleException: The configured protocol [org.apache.coyote.http11.Http11AprProtocol] requires the APR/native library which is not available at org.apache.catalina.connector.Connector.initInternal(Connector.java:972) at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102) ... 12 more
Checked a lot of information on the Internet,
Windows environment
APR needs to install three components:
1. APR library
2. JNI wrappers for APR used by Tomcat (libtcnative)
3. OpenSSL libraries are
downloaded from http://tomcat.heanet.ie/native/1.1.14/binaries/win32/ tcnative-1.1.10.dll, tcnative-1.1.10.dll already contains the above three components, so just copy tcnative-1.1.10.dll to the bin of tomcat.
1. APR library
2. JNI wrappers for APR used by Tomcat (libtcnative)
3. OpenSSL libraries are
downloaded from http://tomcat.heanet.ie/native/1.1.14/binaries/win32/ tcnative-1.1.10.dll, tcnative-1.1.10.dll already contains the above three components, so just copy tcnative-1.1.10.dll to the bin of tomcat.
After working for a long time, I still get an error! ! ! The final solution is: copy the tcnative-1.dll under Tomcat7\bin to the jdk\bin directory and replace it. (probably a version issue)
Summary: tcnative-1.dll does not need to be downloaded, at least for Tomcat7, we can find this dll in its bin directory.