【问题解决:信息提示】SpringBoot启动时提示The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path

问题描述

springboot程序在启动时提示信息

[2018-10-24 21:59:05.214] - 440 信息 [restartedMain] --- org.apache.catalina.core.StandardService: Starting service [Tomcat]
[2018-10-24 21:59:05.220] - 440 信息 [restartedMain] --- org.apache.catalina.core.StandardEngine: Starting Servlet Engine: Apache Tomcat/8.5.34
[2018-10-24 21:59:05.251] - 440 信息 [localhost-startStop-1] --- org.apache.catalina.core.AprLifecycleListener: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [D:\Work\Java\jdk1.8.0_162\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;D:\Work\Java\jdk1.8.0_162\jre\bin;D:/Work/Java/jdk1.8.0_162/bin/../jre/bin/server;D:/Work/Java/jdk1.8.0_162/bin/../jre/bin;D:/Work/Java/jdk1.8.0_162/bin/../jre/lib/amd64;D:\Work\Java\jdk1.8.0_162\bin;D:\Work\Java\jre1.8.0_162\bin;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;D:\Work\04_Plug-in unit\apache-maven-3.5.3\bin;D:\Work\04_Plug-in unit\gradle-2.10\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;D:\Work\03_Database\MySQL\bin;C:\Program Files\Microsoft VS Code\bin;D:\Work\04_Plug-in unit\TortoiseSVN_1.9.7\bin;D:\Work\04_Plug-in unit\Git\Git\cmd;C:\Users\Sunny\AppData\Local\Microsoft\WindowsApps;;D:\Work\04_Plug-in unit\Mercurial;D:\Work\02_DevelopmentTools\eclipse_4.8_x64_photon;;.]
[2018-10-24 21:59:05.959] - 440 信息 [localhost-startStop-1] --- org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/]: Initializing Spring embedded WebApplicationContext

解决方式

把tcnative-1.dll文件放至 Tomcat 6.0\bin 目录下,

或者配置tomcat的环境变量

新建变量名TOMCAT_HOME,值设置为tomcat的安装目录

然后添加到PATH中

问题分析

tomcat整合本地apr会使效率提升:
一是,处理静态资源的时候速度更快,(注:有人用jmeter,对使用apr前后的tomcat进行压力测试,结果显示,性能是有一定的提升,但是没有想象中多,只有一点点,当然,这与运行的逻辑有关,但是我个人认为在大多数情况下这部分性能提升甚微)。
二是,我认为提升比较多的是对ssl的处理效率,当tomcat处理https的请求是,如果使用本地的openssl库,肯定会比前面提升的效率高。(虽然没有实际测试数据,但我推测这里的性能提升比例上要比第一点多得多)。

运行本地apr,需要一下三个库:
  * APR library
  * JNI wrappers for APR used by Tomcat (libtcnative)
  * OpenSSL libraries

补充一下,其实这个并不是eclipse或者是myeclipse的问题,而是tomcat本身一个调用本地库的提高运行效率的特性。tomcat没有找到相应的本地库,提示一下而已。

原文地址:https://www.cnblogs.com/sunny3096/p/9846592.html

时间: 2024-10-07 13:51:37

【问题解决:信息提示】SpringBoot启动时提示The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path的相关文章

信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path:

问题信息详细: 信息: 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 (x86)\Java\jre1.8.0_111\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Win

解决Tomcat启动时出现的The APR based Apache Tomcat Native library异常

现在用的tomcat6.0,不知道大家注意没有,在启动的时候,那个启动窗口最上面出现这样一条信息: 信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: 这实际上是tomcat推荐使用apache的apr 需要下载tcnative-1.dll 下载后放到tom

启动报The APR based Apache Tomcat Native library which allows optimal performance in production environ

mnesia在频繁操作数据的过程可能会报错:** WARNING ** Mnesia is overloaded: {dump_log, write_threshold},可以看出,mnesia应该是过载了.这个警告在mnesia dump操作会发生这个问题,表类型为disc_only_copies .disc_copies都可能会发生. 如何重现这个问题,例子的场景是多个进程同时在不断地mnesia:dirty_write/2 mnesia过载分析 1.抛出警告是在mnesia 增加dump

The APR based Apache Tomcat Native library tomcat启动错误

The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib 由代码可知是缺少APR模块导致的错误. 1.安装APR wget http://apache

解决tomcat启动出现in production environments was not found on the java.library.path:xxx

如图所示,Eclipse中启动tomcat时出现not found on the java.library.path等信息,可以通过下载tomcat-native-1.1.32-win32-bin.zip,解压,对应系统是32位.64位,把tcnative-1.dll文件复制到$JAVA_HOME/bin下,重启tomcat即可解决!

java_tomcat_the_APR based Apache Tomcat 小喵咪死活启动报错_临时方案

报错信息如下: 信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\Program Files\Java\jdk1.6.0_33\bin; 造成结果: IDE中无法加载web项目 ,不方便调试. 解决步奏: 1 百度之,各种tcnative-1.dll

Eclipse启动时提示Failed to load the JNI shared library jvm.dll

Eclipse启动时提示如下信息: Failed to load the JNI shared library "D:\eclipse\jre\bin\server\jvm.dll". 请检查JRE与Eclipse的架构是否相符. •对于32位Eclipse可执行文件(Windows上的eclipse.exe),必须使用32位JVM,对于64位Eclipse可执行文件,必须使用64位JVM. 32位Eclipse不适用于64位JVM. 原文地址:https://www.cnblogs.

VMware ESXi 启动时提示引导错误:不是VMware引导槽。找不到管理程序(bank6 not a vmware boot bank no hypervisor found)

VMware ESXi 启动时提示引导错误: bank6 not a vmware boot bank no hypervisor found 大概中文意思是:不是VMware引导槽.找不到管理程序. 网上看到https://communities.vmware.com/thread/429698 有网友解答说,删除分区的字符会导致GPT修改(大意) 才想起重启前,在PE下转移硬盘数据,因为ESXi的分区比较多,看着碍眼手贱删掉了2个分局的字符.... 再看https://kb.vmware.c

http启动时提示如下错误Permission denied

apache配置了多端口,启动时提示如下错误,原因是selinux开启导致 [[email protected] conf]# /etc/init.d/httpd start Starting httpd: [Tue Dec 20 11:34:44 2016] [warn] NameVirtualHost *:80 has no VirtualHosts (13)Permission denied: make_sock: could not bind to address [::]:8001 (