问题:
:: Spring Boot :: (v2.0.0.RELEASE)
2018-03-16 23:19:34.815 INFO 6564 --- [ main] com.imooc.GirlApplication : Starting GirlApplication on Lucky with PID 6564 (E:\dreamPlan_SpringBoot\IdeaProjects\girl\target\classes started by Lucky in E:\dreamPlan_SpringBoot\IdeaProjects\girl)
2018-03-16 23:19:34.818 INFO 6564 --- [ main] com.imooc.GirlApplication : No active profile set, falling back to default profiles: default
2018-03-16 23:19:34.854 INFO 6564 --- [ main] ConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@61df66b6: startup date [Fri Mar 16 23:19:34 CST 2018]; root of context hierarchy
2018-03-16 23:19:35.489 ERROR 6564 --- [ main] o.a.catalina.core.AprLifecycleListener : An incompatible version [1.1.24] of the APR based Apache Tomcat Native library is installed, while Tomcat requires version [1.2.14]
2018-03-16 23:19:35.548 INFO 6564 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8082 (http)
2018-03-16 23:19:35.557 ERROR 6564 --- [ main] o.a.catalina.core.AprLifecycleListener : An incompatible version [1.1.24] of the APR based Apache Tomcat Native library is installed, while Tomcat requires version [1.2.14]
2018-03-16 23:19:35.563 INFO 6564 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2018-03-16 23:19:35.564 INFO 6564 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.28
2018-03-16 23:19:35.567 ERROR 6564 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener : An incompatible version [1.1.24] of the APR based Apache Tomcat Native library is installed, while Tomcat requires version [1.2.14]
原因:
启动tomcat 7.0, 看到日志里出现严重警告,
An incompatible version 1.1.14 of APR based Apache Tomcat Native library is installed, while Tomcat requires version 1.1.24.就上网查了查,APR是Apache portable Runtime的缩写,是tomcat的一个可选组件。
这个工程组件在tomcat中的使用增进了稳定性和性能,特别是当tomcat也用于web服务器的时候. 按照网上的方法,
在http://archive.apache.org/dist/tomcat/tomcat-connectors/native/1.2.14/binaries/上下载了1.1.24版本,
【tcnative-1.dll 、tcnative-1-src.pdb 】复制到tomcat目录的bin文件夹下,重启tomcat。
但是tomcat的启动日志里还是出现这个警告,然后我把该dll文件再复制到jdk的下的bin文件夹下,和jre下的bin文件夹下,再次重启,警告已经没了。
我是直接放在C盘/Windows/system32/下
正常运行
2018-03-16 23:38:37.720 INFO 14260 --- [ main] com.imooc.GirlApplication : Starting GirlApplication on Lucky with PID 14260 (E:\dreamPlan_SpringBoot\IdeaProjects\girl\target\classes started by Lucky in E:\dreamPlan_SpringBoot\IdeaProjects\girl)
2018-03-16 23:38:37.724 INFO 14260 --- [ main] com.imooc.GirlApplication : No active profile set, falling back to default profiles: default
2018-03-16 23:38:37.764 INFO 14260 --- [ main] ConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@61df66b6: startup date [Fri Mar 16 23:38:37 CST 2018]; root of context hierarchy
2018-03-16 23:38:38.472 INFO 14260 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8082 (http)
2018-03-16 23:38:38.487 INFO 14260 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2018-03-16 23:38:38.487 INFO 14260 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.28
2018-03-16 23:38:38.491 INFO 14260 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener : Loaded APR based Apache Tomcat Native library [1.2.14] using APR version [1.6.2].
2018-03-16 23:38:38.491 INFO 14260 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener : APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
2018-03-16 23:38:38.491 INFO 14260 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener : APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
2018-03-16 23:38:39.650 INFO 14260 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener : OpenSSL successfully initialized [OpenSSL 1.0.2l 25 May 2017]
2018-03-16 23:38:39.717 INFO 14260 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/girl] : Initializing Spring embedded WebApplicationContext
|