关于Tomcat启动时报The APR based Apache Tomcat Native library which allows optimal performanc e in production environments was not found on the java.library.path

错误信息如下

八月 01, 2016 10:11:15 上午 org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.7.0_13\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;.;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Java\jdk1.7.0_13\bin;C:\Program Files\Java\jdk1.7.0_13\jre\bin;D:\Program Files (x86)\OpenVPN\bin;d:\Program Files (x86)\Rational\Common;D:\Program Files\TortoiseSVN\bin;.
八月 01, 2016 10:11:16 上午 org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
八月 01, 2016 10:11:16 上午 org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
八月 01, 2016 10:11:16 上午 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 696 ms
八月 01, 2016 10:11:16 上午 org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
八月 01, 2016 10:11:16 上午 org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.53
八月 01, 2016 10:11:16 上午 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory D:\apache-tomcat-7.0.53\webapps\docs
八月 01, 2016 10:11:16 上午 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory D:\apache-tomcat-7.0.53\webapps\examples
八月 01, 2016 10:11:17 上午 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory D:\apache-tomcat-7.0.53\webapps\host-manager
八月 01, 2016 10:11:17 上午 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory D:\apache-tomcat-7.0.53\webapps\manager
八月 01, 2016 10:11:17 上午 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory D:\apache-tomcat-7.0.53\webapps\ROOT
八月 01, 2016 10:11:17 上午 org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
八月 01, 2016 10:11:17 上午 org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
八月 01, 2016 10:11:17 上午 org.apache.catalina.startup.Catalina start
INFO: Server startup in 1565 ms

提示错误信息的意思是支持Tomcat运行的apr找不到。

总结网上的各种解决方案,得出两种可能的解决办法。

1.Tomcat中conf文件夹的web.xml配置需要如下所示

    <servlet-mapping>
        <servlet-name>default</servlet-name>
        <url-pattern>/</url-pattern>
    </servlet-mapping>

    <!-- The mappings for the JSP servlet -->
    <servlet-mapping>
        <servlet-name>jsp</servlet-name>
        <url-pattern>*.jsp</url-pattern>
        <url-pattern>*.jspx</url-pattern>
    </servlet-mapping>

2.在C:/WINDOWS/system32/或者Tomcat安装路径下的bin目录里复制粘贴tcnative-1.dll文件。

文件下载链接如下(请选择对应的32位或者64位):http://download.csdn.net/detail/ll8128/9591468

posted @ 2016-08-01 10:17  llcode  阅读(1346)  评论(0编辑  收藏  举报