incompatible version [1.1.34] of the APR based Apache Tomcat Native library

回眸只為那壹抹淺笑 提交于 2019-12-22 04:44:06

问题


On my openSUSE Leap 42.3 server during Spring Boot 2.0.0.M6 application startup on Embedded Tomcat server I'm seeing the following error in the logs:

ERROR 30471 --- [main] o.a.catalina.core.AprLifecycleListener: An incompatible version [1.1.34] of the APR based Apache Tomcat Native library is installed, while Tomcat requires version [1.2.14]

Could you please explain what should be fixed there(and where) in order to avoid this error?


回答1:


Since the answer was incomplete for me and it is the first thread that google finds for the research i'll say what solves the problem for me.

I had to download the Apache Tomcat Native Library from https://tomcat.apache.org/download-native.cgi then put the content of the bin folder (with the tcnative-1.dll) into the jdk bin folder that i use.

Hope it will help someone!

source: APR version mismatch error upon startup




回答2:


This is because system installed tomcat(CATALINA_HOME) is conflicting libraries with spring boot tomcat. so to get rid of this error download the native library of required version and replace with bin folder's tcnative-1.dll

download link : https://archive.apache.org/dist/tomcat/tomcat-connectors/native/




回答3:


The same thing happened to me as well. In my case I had Tomcat 8.0.37 on my machine so it was used (by embedded Tomcat from Spring Boot) via CATALINA_HOME. I checked the version of Tomcat the Spring Boot (in my case 2.0.5.RELEASE) used (it was 8.5.34) and just replaced the old version with the newest one changing CATALINA_HOME as well of course. Then the warning went away.

I assume my approach is better than downloading some native Tomcat libraries and placing them near the JDK.




回答4:


You probably (improperly) upgraded Tomcat and so you have an old version of the native library. You need to use the version that shipped with your version of Tomcat.

Tomcat ships with native libraries in the bin/ directory of the distribution. Make sure you don't have some old version sitting-around somewhere. You may have to re-build libtcnative from scratch and re-bundle it with your embedded application.

Or, consider going with a non-native solution and switching to Tomcat's NIO connector.



来源:https://stackoverflow.com/questions/48611714/incompatible-version-1-1-34-of-the-apr-based-apache-tomcat-native-library

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!