首页 > 其他分享 >Spring Boot 不能加载 tcnative-2.dll 库(Can't load library: tcnative-2.dll)

Spring Boot 不能加载 tcnative-2.dll 库(Can't load library: tcnative-2.dll)

时间:2024-06-06 15:34:46浏览次数:23  
标签:load bin Windows System32 tcnative dll Program Files dotnet

Spring Boot 不能加载 tcnative-2.dll 库

本文将介绍怎样解决 Spring Boot 在启动时抛出 “org.apache.tomcat.jni.LibraryNotFoundError: Can't load library: *\tcnative-2.dll”错误。

在使用SpringBoot3创建项目的过程中,将日志的级别调为debug,日志打印了 “org.apache.tomcat.jni.LibraryNotFoundError: Can't load library: *\tcnative-2.dll”错误。

2024-06-06T15:22:33.222+08:00 DEBUG 19352 --- [           main] o.a.catalina.core.AprLifecycleListener   : The Apache Tomcat Native library could not be found using names [tcnative-2, libtcnative-2, tcnative-1, libtcnative-1] on the java.library.path [E:\SDK\Java\temurin\jdk-17.0.10+7\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32;E:\SDK\Java\temurin\jdk-21.0.2+13\bin;C:\Windows;E:\apache\apache-maven-3.9.6\bin;E:\mysql\bin;E:\dotnet;E:\pnpm;E:\nvm;E:\nodejs;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\PowerShell\7\;E:\platform-tools;C:\ProgramData\chocolatey\bin;D:\NetSarang\Xshell\;D:\NetSarang\Xftp\;C:\Program Files (x86)\dotnet\;C:\Program Files\dotnet\;E:\TortoiseSVN\bin;D:\Snipaste;C:\Program Files\Amazon\AWSCLIV2\;C:\Program Files\Docker\Docker\resources\bin;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Users\zjw\AppData\Local\Programs\Ollama;E:\VSCode;C:\Program Files\WireGuard\;E:\Python\Python311;E:\Python\Python311\Scripts;E:\gradle\gradle-8.7\bin;E:\nvm;E:\Git\cmd;C:\Windows\system32;E:\SDK\Java\temurin\jdk-21.0.2+13\bin;C:\Windows;E:\apache\apache-maven-3.9.6\bin;E:\mysql\bin;E:\dotnet;E:\pnpm;E:\nvm;E:\nodejs;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\PowerShell\7\;E:\platform-tools;C:\ProgramData\chocolatey\bin;D:\NetSarang\Xshell\;D:\NetSarang\Xftp\;C:\Program Files (x86)\dotnet\;C:\Program Files\dotnet\;E:\TortoiseSVN\bin;D:\Snipaste;C:\Program Files\Amazon\AWSCLIV2\;C:\Program Files\Docker\Docker\resources\bin;E:\Git\cmd;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Users\zjw\AppData\Local\Programs\Ollama;E:\VSCode;C:\Program Files\WireGuard\;E:\Python\Python311;E:\Python\Python311\Scripts;E:\gradle\gradle-8.7\bin;E:\nvm;C:\Users\zjw\AppData\Local\JetBrains\Toolbox\scripts;;.]. The errors reported were [Can't load library: E:\code\IdeaProjects\lease\bin\tcnative-2.dll, Can't load library: E:\code\IdeaProjects\lease\bin\libtcnative-2.dll, Can't load library: E:\code\IdeaProjects\lease\bin\tcnative-1.dll, Can't load library: E:\code\IdeaProjects\lease\bin\libtcnative-1.dll, no tcnative-2 in java.library.path: E:\SDK\Java\temurin\jdk-17.0.10+7\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32;E:\SDK\Java\temurin\jdk-21.0.2+13\bin;C:\Windows;E:\apache\apache-maven-3.9.6\bin;E:\mysql\bin;E:\dotnet;E:\pnpm;E:\nvm;E:\nodejs;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\PowerShell\7\;E:\platform-tools;C:\ProgramData\chocolatey\bin;D:\NetSarang\Xshell\;D:\NetSarang\Xftp\;C:\Program Files (x86)\dotnet\;C:\Program Files\dotnet\;E:\TortoiseSVN\bin;D:\Snipaste;C:\Program Files\Amazon\AWSCLIV2\;C:\Program Files\Docker\Docker\resources\bin;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Users\zjw\AppData\Local\Programs\Ollama;E:\VSCode;C:\Program Files\WireGuard\;E:\Python\Python311;E:\Python\Python311\Scripts;E:\gradle\gradle-8.7\bin;E:\nvm;E:\Git\cmd;C:\Windows\system32;E:\SDK\Java\temurin\jdk-21.0.2+13\bin;C:\Windows;E:\apache\apache-maven-3.9.6\bin;E:\mysql\bin;E:\dotnet;E:\pnpm;E:\nvm;E:\nodejs;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\PowerShell\7\;E:\platform-tools;C:\ProgramData\chocolatey\bin;D:\NetSarang\Xshell\;D:\NetSarang\Xftp\;C:\Program Files (x86)\dotnet\;C:\Program Files\dotnet\;E:\TortoiseSVN\bin;D:\Snipaste;C:\Program Files\Amazon\AWSCLIV2\;C:\Program Files\Docker\Docker\resources\bin;E:\Git\cmd;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Users\zjw\AppData\Local\Programs\Ollama;E:\VSCode;C:\Program Files\WireGuard\;E:\Python\Python311;E:\Python\Python311\Scripts;E:\gradle\gradle-8.7\bin;E:\nvm;C:\Users\zjw\AppData\Local\JetBrains\Toolbox\scripts;;., no libtcnative-2 in java.library.path: E:\SDK\Java\temurin\jdk-17.0.10+7\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32;E:\SDK\Java\temurin\jdk-21.0.2+13\bin;C:\Windows;E:\apache\apache-maven-3.9.6\bin;E:\mysql\bin;E:\dotnet;E:\pnpm;E:\nvm;E:\nodejs;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\PowerShell\7\;E:\platform-tools;C:\ProgramData\chocolatey\bin;D:\NetSarang\Xshell\;D:\NetSarang\Xftp\;C:\Program Files (x86)\dotnet\;C:\Program Files\dotnet\;E:\TortoiseSVN\bin;D:\Snipaste;C:\Program Files\Amazon\AWSCLIV2\;C:\Program Files\Docker\Docker\resources\bin;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Users\zjw\AppData\Local\Programs\Ollama;E:\VSCode;C:\Program Files\WireGuard\;E:\Python\Python311;E:\Python\Python311\Scripts;E:\gradle\gradle-8.7\bin;E:\nvm;E:\Git\cmd;C:\Windows\system32;E:\SDK\Java\temurin\jdk-21.0.2+13\bin;C:\Windows;E:\apache\apache-maven-3.9.6\bin;E:\mysql\bin;E:\dotnet;E:\pnpm;E:\nvm;E:\nodejs;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\PowerShell\7\;E:\platform-tools;C:\ProgramData\chocolatey\bin;D:\NetSarang\Xshell\;D:\NetSarang\Xftp\;C:\Program Files (x86)\dotnet\;C:\Program Files\dotnet\;E:\TortoiseSVN\bin;D:\Snipaste;C:\Program Files\Amazon\AWSCLIV2\;C:\Program Files\Docker\Docker\resources\bin;E:\Git\cmd;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Users\zjw\AppData\Local\Programs\Ollama;E:\VSCode;C:\Program Files\WireGuard\;E:\Python\Python311;E:\Python\Python311\Scripts;E:\gradle\gradle-8.7\bin;E:\nvm;C:\Users\zjw\AppData\Local\JetBrains\Toolbox\scripts;;., no tcnative-1 in java.library.path: E:\SDK\Java\temurin\jdk-17.0.10+7\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32;E:\SDK\Java\temurin\jdk-21.0.2+13\bin;C:\Windows;E:\apache\apache-maven-3.9.6\bin;E:\mysql\bin;E:\dotnet;E:\pnpm;E:\nvm;E:\nodejs;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\PowerShell\7\;E:\platform-tools;C:\ProgramData\chocolatey\bin;D:\NetSarang\Xshell\;D:\NetSarang\Xftp\;C:\Program Files (x86)\dotnet\;C:\Program Files\dotnet\;E:\TortoiseSVN\bin;D:\Snipaste;C:\Program Files\Amazon\AWSCLIV2\;C:\Program Files\Docker\Docker\resources\bin;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Users\zjw\AppData\Local\Programs\Ollama;E:\VSCode;C:\Program Files\WireGuard\;E:\Python\Python311;E:\Python\Python311\Scripts;E:\gradle\gradle-8.7\bin;E:\nvm;E:\Git\cmd;C:\Windows\system32;E:\SDK\Java\temurin\jdk-21.0.2+13\bin;C:\Windows;E:\apache\apache-maven-3.9.6\bin;E:\mysql\bin;E:\dotnet;E:\pnpm;E:\nvm;E:\nodejs;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\PowerShell\7\;E:\platform-tools;C:\ProgramData\chocolatey\bin;D:\NetSarang\Xshell\;D:\NetSarang\Xftp\;C:\Program Files (x86)\dotnet\;C:\Program Files\dotnet\;E:\TortoiseSVN\bin;D:\Snipaste;C:\Program Files\Amazon\AWSCLIV2\;C:\Program Files\Docker\Docker\resources\bin;E:\Git\cmd;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Users\zjw\AppData\Local\Programs\Ollama;E:\VSCode;C:\Program Files\WireGuard\;E:\Python\Python311;E:\Python\Python311\Scripts;E:\gradle\gradle-8.7\bin;E:\nvm;C:\Users\zjw\AppData\Local\JetBrains\Toolbox\scripts;;., no libtcnative-1 in java.library.path: E:\SDK\Java\temurin\jdk-17.0.10+7\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32;E:\SDK\Java\temurin\jdk-21.0.2+13\bin;C:\Windows;E:\apache\apache-maven-3.9.6\bin;E:\mysql\bin;E:\dotnet;E:\pnpm;E:\nvm;E:\nodejs;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\PowerShell\7\;E:\platform-tools;C:\ProgramData\chocolatey\bin;D:\NetSarang\Xshell\;D:\NetSarang\Xftp\;C:\Program Files (x86)\dotnet\;C:\Program Files\dotnet\;E:\TortoiseSVN\bin;D:\Snipaste;C:\Program Files\Amazon\AWSCLIV2\;C:\Program Files\Docker\Docker\resources\bin;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Users\zjw\AppData\Local\Programs\Ollama;E:\VSCode;C:\Program Files\WireGuard\;E:\Python\Python311;E:\Python\Python311\Scripts;E:\gradle\gradle-8.7\bin;E:\nvm;E:\Git\cmd;C:\Windows\system32;E:\SDK\Java\temurin\jdk-21.0.2+13\bin;C:\Windows;E:\apache\apache-maven-3.9.6\bin;E:\mysql\bin;E:\dotnet;E:\pnpm;E:\nvm;E:\nodejs;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\PowerShell\7\;E:\platform-tools;C:\ProgramData\chocolatey\bin;D:\NetSarang\Xshell\;D:\NetSarang\Xftp\;C:\Program Files (x86)\dotnet\;C:\Program Files\dotnet\;E:\TortoiseSVN\bin;D:\Snipaste;C:\Program Files\Amazon\AWSCLIV2\;C:\Program Files\Docker\Docker\resources\bin;E:\Git\cmd;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Users\zjw\AppData\Local\Programs\Ollama;E:\VSCode;C:\Program Files\WireGuard\;E:\Python\Python311;E:\Python\Python311\Scripts;E:\gradle\gradle-8.7\bin;E:\nvm;C:\Users\zjw\AppData\Local\JetBrains\Toolbox\scripts;;.]

org.apache.tomcat.jni.LibraryNotFoundError: Can't load library: E:\code\IdeaProjects\lease\bin\tcnative-2.dll, Can't load library: E:\code\IdeaProjects\lease\bin\libtcnative-2.dll, Can't load library: E:\code\IdeaProjects\lease\bin\tcnative-1.dll, Can't load library: E:\code\IdeaProjects\lease\bin\libtcnative-1.dll, no tcnative-2 in java.library.path: E:\SDK\Java\temurin\jdk-17.0.10+7\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32;E:\SDK\Java\temurin\jdk-21.0.2+13\bin;C:\Windows;E:\apache\apache-maven-3.9.6\bin;E:\mysql\bin;E:\dotnet;E:\pnpm;E:\nvm;E:\nodejs;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\PowerShell\7\;E:\platform-tools;C:\ProgramData\chocolatey\bin;D:\NetSarang\Xshell\;D:\NetSarang\Xftp\;C:\Program Files (x86)\dotnet\;C:\Program Files\dotnet\;E:\TortoiseSVN\bin;D:\Snipaste;C:\Program Files\Amazon\AWSCLIV2\;C:\Program Files\Docker\Docker\resources\bin;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Users\zjw\AppData\Local\Programs\Ollama;E:\VSCode;C:\Program Files\WireGuard\;E:\Python\Python311;E:\Python\Python311\Scripts;E:\gradle\gradle-8.7\bin;E:\nvm;E:\Git\cmd;C:\Windows\system32;E:\SDK\Java\temurin\jdk-21.0.2+13\bin;C:\Windows;E:\apache\apache-maven-3.9.6\bin;E:\mysql\bin;E:\dotnet;E:\pnpm;E:\nvm;E:\nodejs;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\PowerShell\7\;E:\platform-tools;C:\ProgramData\chocolatey\bin;D:\NetSarang\Xshell\;D:\NetSarang\Xftp\;C:\Program Files (x86)\dotnet\;C:\Program Files\dotnet\;E:\TortoiseSVN\bin;D:\Snipaste;C:\Program Files\Amazon\AWSCLIV2\;C:\Program Files\Docker\Docker\resources\bin;E:\Git\cmd;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Users\zjw\AppData\Local\Programs\Ollama;E:\VSCode;C:\Program Files\WireGuard\;E:\Python\Python311;E:\Python\Python311\Scripts;E:\gradle\gradle-8.7\bin;E:\nvm;C:\Users\zjw\AppData\Local\JetBrains\Toolbox\scripts;;., no libtcnative-2 in java.library.path: E:\SDK\Java\temurin\jdk-17.0.10+7\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32;E:\SDK\Java\temurin\jdk-21.0.2+13\bin;C:\Windows;E:\apache\apache-maven-3.9.6\bin;E:\mysql\bin;E:\dotnet;E:\pnpm;E:\nvm;E:\nodejs;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\PowerShell\7\;E:\platform-tools;C:\ProgramData\chocolatey\bin;D:\NetSarang\Xshell\;D:\NetSarang\Xftp\;C:\Program Files (x86)\dotnet\;C:\Program Files\dotnet\;E:\TortoiseSVN\bin;D:\Snipaste;C:\Program Files\Amazon\AWSCLIV2\;C:\Program Files\Docker\Docker\resources\bin;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Users\zjw\AppData\Local\Programs\Ollama;E:\VSCode;C:\Program Files\WireGuard\;E:\Python\Python311;E:\Python\Python311\Scripts;E:\gradle\gradle-8.7\bin;E:\nvm;E:\Git\cmd;C:\Windows\system32;E:\SDK\Java\temurin\jdk-21.0.2+13\bin;C:\Windows;E:\apache\apache-maven-3.9.6\bin;E:\mysql\bin;E:\dotnet;E:\pnpm;E:\nvm;E:\nodejs;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\PowerShell\7\;E:\platform-tools;C:\ProgramData\chocolatey\bin;D:\NetSarang\Xshell\;D:\NetSarang\Xftp\;C:\Program Files (x86)\dotnet\;C:\Program Files\dotnet\;E:\TortoiseSVN\bin;D:\Snipaste;C:\Program Files\Amazon\AWSCLIV2\;C:\Program Files\Docker\Docker\resources\bin;E:\Git\cmd;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Users\zjw\AppData\Local\Programs\Ollama;E:\VSCode;C:\Program Files\WireGuard\;E:\Python\Python311;E:\Python\Python311\Scripts;E:\gradle\gradle-8.7\bin;E:\nvm;C:\Users\zjw\AppData\Local\JetBrains\Toolbox\scripts;;., no tcnative-1 in java.library.path: E:\SDK\Java\temurin\jdk-17.0.10+7\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32;E:\SDK\Java\temurin\jdk-21.0.2+13\bin;C:\Windows;E:\apache\apache-maven-3.9.6\bin;E:\mysql\bin;E:\dotnet;E:\pnpm;E:\nvm;E:\nodejs;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\PowerShell\7\;E:\platform-tools;C:\ProgramData\chocolatey\bin;D:\NetSarang\Xshell\;D:\NetSarang\Xftp\;C:\Program Files (x86)\dotnet\;C:\Program Files\dotnet\;E:\TortoiseSVN\bin;D:\Snipaste;C:\Program Files\Amazon\AWSCLIV2\;C:\Program Files\Docker\Docker\resources\bin;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Users\zjw\AppData\Local\Programs\Ollama;E:\VSCode;C:\Program Files\WireGuard\;E:\Python\Python311;E:\Python\Python311\Scripts;E:\gradle\gradle-8.7\bin;E:\nvm;E:\Git\cmd;C:\Windows\system32;E:\SDK\Java\temurin\jdk-21.0.2+13\bin;C:\Windows;E:\apache\apache-maven-3.9.6\bin;E:\mysql\bin;E:\dotnet;E:\pnpm;E:\nvm;E:\nodejs;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\PowerShell\7\;E:\platform-tools;C:\ProgramData\chocolatey\bin;D:\NetSarang\Xshell\;D:\NetSarang\Xftp\;C:\Program Files (x86)\dotnet\;C:\Program Files\dotnet\;E:\TortoiseSVN\bin;D:\Snipaste;C:\Program Files\Amazon\AWSCLIV2\;C:\Program Files\Docker\Docker\resources\bin;E:\Git\cmd;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Users\zjw\AppData\Local\Programs\Ollama;E:\VSCode;C:\Program Files\WireGuard\;E:\Python\Python311;E:\Python\Python311\Scripts;E:\gradle\gradle-8.7\bin;E:\nvm;C:\Users\zjw\AppData\Local\JetBrains\Toolbox\scripts;;., no libtcnative-1 in java.library.path: E:\SDK\Java\temurin\jdk-17.0.10+7\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32;E:\SDK\Java\temurin\jdk-21.0.2+13\bin;C:\Windows;E:\apache\apache-maven-3.9.6\bin;E:\mysql\bin;E:\dotnet;E:\pnpm;E:\nvm;E:\nodejs;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\PowerShell\7\;E:\platform-tools;C:\ProgramData\chocolatey\bin;D:\NetSarang\Xshell\;D:\NetSarang\Xftp\;C:\Program Files (x86)\dotnet\;C:\Program Files\dotnet\;E:\TortoiseSVN\bin;D:\Snipaste;C:\Program Files\Amazon\AWSCLIV2\;C:\Program Files\Docker\Docker\resources\bin;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Users\zjw\AppData\Local\Programs\Ollama;E:\VSCode;C:\Program Files\WireGuard\;E:\Python\Python311;E:\Python\Python311\Scripts;E:\gradle\gradle-8.7\bin;E:\nvm;E:\Git\cmd;C:\Windows\system32;E:\SDK\Java\temurin\jdk-21.0.2+13\bin;C:\Windows;E:\apache\apache-maven-3.9.6\bin;E:\mysql\bin;E:\dotnet;E:\pnpm;E:\nvm;E:\nodejs;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\PowerShell\7\;E:\platform-tools;C:\ProgramData\chocolatey\bin;D:\NetSarang\Xshell\;D:\NetSarang\Xftp\;C:\Program Files (x86)\dotnet\;C:\Program Files\dotnet\;E:\TortoiseSVN\bin;D:\Snipaste;C:\Program Files\Amazon\AWSCLIV2\;C:\Program Files\Docker\Docker\resources\bin;E:\Git\cmd;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Users\zjw\AppData\Local\Programs\Ollama;E:\VSCode;C:\Program Files\WireGuard\;E:\Python\Python311;E:\Python\Python311\Scripts;E:\gradle\gradle-8.7\bin;E:\nvm;C:\Users\zjw\AppData\Local\JetBrains\Toolbox\scripts;;.
	at org.apache.tomcat.jni.Library.<init>(Library.java:91) ~[tomcat-embed-core-10.1.24.jar:10.1.24]
	at org.apache.tomcat.jni.Library.initialize(Library.java:147) ~[tomcat-embed-core-10.1.24.jar:10.1.24]
	at org.apache.catalina.core.AprLifecycleListener.init(AprLifecycleListener.java:189) ~[tomcat-embed-core-10.1.24.jar:10.1.24]
	at org.apache.catalina.core.AprLifecycleListener.isAprAvailable(AprLifecycleListener.java:106) ~[tomcat-embed-core-10.1.24.jar:10.1.24]
	at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getDefaultServerLifecycleListeners(TomcatServletWebServerFactory.java:191) ~[spring-boot-3.3.0.jar:3.3.0]
	at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.<init>(TomcatServletWebServerFactory.java:138) ~[spring-boot-3.3.0.jar:3.3.0]
	at org.springframework.boot.autoconfigure.web.servlet.ServletWebServerFactoryConfiguration$EmbeddedTomcat.tomcatServletWebServerFactory(ServletWebServerFactoryConfiguration.java:73) ~[spring-boot-autoconfigure-3.3.0.jar:3.3.0]
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
	at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:140) ~[spring-beans-6.1.8.jar:6.1.8]
	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:644) ~[spring-beans-6.1.8.jar:6.1.8]
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:636) ~[spring-beans-6.1.8.jar:6.1.8]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1337) ~[spring-beans-6.1.8.jar:6.1.8]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1167) ~[spring-beans-6.1.8.jar:6.1.8]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:562) ~[spring-beans-6.1.8.jar:6.1.8]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522) ~[spring-beans-6.1.8.jar:6.1.8]
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:337) ~[spring-beans-6.1.8.jar:6.1.8]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-6.1.8.jar:6.1.8]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:335) ~[spring-beans-6.1.8.jar:6.1.8]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:205) ~[spring-beans-6.1.8.jar:6.1.8]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.getWebServerFactory(ServletWebServerApplicationContext.java:223) ~[spring-boot-3.3.0.jar:3.3.0]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:186) ~[spring-boot-3.3.0.jar:3.3.0]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:162) ~[spring-boot-3.3.0.jar:3.3.0]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:618) ~[spring-context-6.1.8.jar:6.1.8]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) ~[spring-boot-3.3.0.jar:3.3.0]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754) ~[spring-boot-3.3.0.jar:3.3.0]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456) ~[spring-boot-3.3.0.jar:3.3.0]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:335) ~[spring-boot-3.3.0.jar:3.3.0]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1363) ~[spring-boot-3.3.0.jar:3.3.0]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1352) ~[spring-boot-3.3.0.jar:3.3.0]
	at com.zjw.lease.AdminWebApplication.main(AdminWebApplication.java:17) ~[classes/:na]

为什么要去加载 tcnative-2.dll 库呢?

因为 Tomcat 中的 connector 为了提高性能,采用了加载与操作系统绑定(非跨平台)的本地库的方式,比如:Windows 系统中就是 .dll 动态链接库。

默认会去 Tomcat 的 bin 目录下去找,但是由于 Spring Boot 的 Tomcat 是嵌入式的,没有这些 .dll,所以需要自己去官网下载,并解压放到 C:\Windows\System32\ 目录下。

什么是 Tomcat Native?

Apache Tomcat Native Library 是与 Apache Tomcat 一起使用的可选组件,它允许 Tomcat 使用 Open SSL 作为 JSSE 的替代品来支持 TLS 连接。说白了,Tomcat Native 就是一套和操作系统紧密结合的库,不同类型的操作系统 Tomcat Native 就会不同,如:Windows 下就是动态链接库,Linux 系统就是 .so 库文件。使用 Tomcat Native 可以调用操作系统底层的能力,提升 Tomcat 的性能。

更多关于 Tomcat Native 的信息,请参考:https://tomcat.apache.org/native-doc/

下载 Tomcat Native

访问 https://archive.apache.org/dist/tomcat/tomcat-connectors/native/2.0.6/binaries/ 地址,下载 Tomcat Native,然后解压压缩包。将 tcnative-1.dll 和 openssl.exe 拷贝到 C:\Windows\System32\ 目录下。如下图:


原文:https://www.hxstrive.com/article/1201.htm

标签:load,bin,Windows,System32,tcnative,dll,Program,Files,dotnet
From: https://www.cnblogs.com/zjw-blog/p/18235217

相关文章

  • 深入解析:酷狗音乐播放时“dsound.dll无法找到”问题及解决方案
    在享受音乐之旅时,遇到“dsound.dll无法找到”的提示无疑给许多酷狗音乐爱好者带来了困扰。这一问题不仅阻碍了正常的音乐播放,也可能暗示着系统中存在潜在的安全隐患。本文将深入探讨该问题的原因,并提供一系列行之有效的解决策略,帮助用户顺利重启音乐之旅。问题背景dsound.dl......
  • 解决《鬼谷八荒》游戏启动问题:vcruntime140_1.dll错误的全面攻略
    在探索《鬼谷八荒》这一广受好评的修仙世界时,不少玩家可能会遇到一个恼人的障碍——“vcruntime140_1.dll无法继续执行代码”的错误提示。这个突如其来的技术难题无疑给原本期待沉浸于修仙之旅的玩家带来不小的困扰。不过,无需忧虑,本文将深入解析这一问题的根源,并提供一系列行之......
  • Windows11系统Pnrphc.dll文件丢失问题
    其实很多用户玩单机游戏或者安装软件的时候就出现过这种问题,如果是新手第一时间会认为是软件或游戏出错了,其实并不是这样,其主要原因就是你电脑系统的该dll文件丢失了或没有安装一些系统软件平台所需要的动态链接库,这时你可以下载这个Pnrphc.dll文件(挑选合适的版本文件)把它放......
  • upload-labs第二关教程
    upload-labs第二关教程第一关的教程可以去主页里面去找。文章目录upload-labs第二关教程1.源代码审计2.MIME类型是什么?3.绕过方法分析1)修改content-typea.上传一个eval.php文件b.然后使用Burpsuite进行抓包修改content-typec.放包:d.打开开发者工具e.使用中国蚁剑进......
  • C#使用advapi32.dll来实现注册表的增、删、改、查
    合集-OpenTools(4) 1..NET使用P/Invoke来实现注册表的增、删、改、查功能05-142..NET实现获取NTP服务器时间并同步(附带Windows系统启用NTP服务功能)05-153.工业福利!用.NET快速开发物联网扫码器设备的通用扫码功能05-174.上位机开发福利!快速掌握.NET中的Modbus通信05-22......
  • upload-labs第一关教程
    upload-labs第一关教程1.源代码分析functioncheckFile(){varfile=document.getElementsByName('upload_file')[0].value;if(file==null||file==""){alert("请选择要上传的文件!");returnfalse;}//定义允许上传的文......
  • Jmeter与loadrunner的区别
    当比较JMeter和LoadRunner时,我们可以从以下几个方面进行更详细的比较:1.**功能和支持的协议**:-JMeter主要支持HTTP、HTTPS、FTP、JMS、SOAP、LDAP等常见协议,适用于Web应用程序和Web服务的性能测试。-LoadRunner支持更多的协议和技术,包括HTTP、HTTPS、JDBC、LDAP、RDP、Ci......
  • Loading.io 不仅仅只有加载动效!| 让创建动效更加简单!
    Loading.io|让创建动效更加简单官网:https://loading.io/在现代的web和移动应用开发中,用户体验(UX)至关重要。一个好的加载动画不仅可以让用户在等待时感到愉悦,还能提升整个应用的专业性和互动性。Loading.io正是这样一个帮助开发者轻松创建和集成加载动画及图标的强大......
  • Loading.io 不仅仅只有加载动效!| 让创建动效更加简单!
    Loading.io|让创建动效更加简单在现代的web和移动应用开发中,用户体验(UX)至关重要。一个好的加载动画不仅可以让用户在等待时感到愉悦,还能提升整个应用的专业性和互动性。Loading.io正是这样一个帮助开发者轻松创建和集成加载动画及图标的强大平台。提供大量动效示例可视......
  • ubuntu 解决apt-get: Some index files failed to download. They have been ignored,
    很多博主都有编写把resolve.config文件里的conserve改为8.8.8.8,但还有一种可能是没有用最新的镜像源网址,导致找不到文件,推荐找一些最近的含有镜像源的帖子。另外就是连过外网之后导致板子和环境的网域不一样,都有可能。一般把这三种方法试了之后都是可以解决问题的。镜像源没有......