警告: The APR based Apache Tomcat Native library failed to load.

警告: The APR based Apache Tomcat Native library failed to load.

(以下内容为自己在学习和开发中所遇到的问题及解决办法,如有不当之处,欢迎指正)

启动服务器,出现如下图所示警告,这是由于Tomcat服务器配置错误导致的。

警告: The APR based Apache Tomcat Native library failed to load.

解决方法:

以idea2019为例

1.Settings -> Build,Execution,Deployment -> Application Servers -> 移出之前部署的Tomcat
警告: The APR based Apache Tomcat Native library failed to load.

2.重新添加新的Tomcat

警告: The APR based Apache Tomcat Native library failed to load.

警告: The APR based Apache Tomcat Native library failed to load.

3.重新部署项目
警告: The APR based Apache Tomcat Native library failed to load.

警告: The APR based Apache Tomcat Native library failed to load.

我试了上面这种方法以后还是报错,又找了一种解决方法,这次成功了

1.打开cmd,在cmd中输入命令:java -version,按回车

2.查看内容是否包含“64”,如果不包含,说明你设置的【JAVA_HOME】的地址是指向32bit的jdk,那么你就需要下载一个64bit的jdk安装,并修改环境变量

电脑->属性->高级系统设置->高级->环境变量
警告: The APR based Apache Tomcat Native library failed to load.

警告: The APR based Apache Tomcat Native library failed to load.

警告: The APR based Apache Tomcat Native library failed to load.

3.安装配置完成以后,重新导入jdk,重启Tomcat运行,正常