Spring Azure applicationinsights 运行时出现 tcnative 错误
启动运行的时候出现错误:
2020-10-20 12:01:21.628 DEBUG 69140 --- [ main] i.n.util.internal.NativeLibraryLoader : netty_tcnative_windows_x86_64 cannot be loaded from java.library.path, now trying export to -Dio.netty.native.workdir: C:\Users\yhu\AppData\Local\Temp
java.lang.UnsatisfiedLinkError: no netty_tcnative_windows_x86_64 in java.library.path: [C:\Dkits\Java\OpenJDK\11.0.4\bin, C:\windows\Sun\Java\bin, C:\windows\system32, C:\windows, %JAVA_HOME%\bin, %MAVEN_HOME%\bin, %GRADLE_HOME%\bin, C:\Program Files (x86)\NetSarang\Xshell 6\, C:\windows\system32, C:\windows, C:\windows\System32\Wbem, C:\windows\System32\WindowsPowerShell\v1.0\, C:\windows\System32\OpenSSH\, C:\Program Files (x86)\Webex\Webex\Applications, C:\Program Files (x86)\Plantronics\Spokes3G\, C:\Program Files (x86)\Enterprise Vault\EVClient\x64\, C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL, C:\Program Files\Intel\Intel(R) Management Engine Components\DAL, C:\Program Files\Intel\WiFi\bin\, C:\Program Files\Common Files\Intel\WirelessCommon\, C:\Program Files\PuTTY\, C:\Program Files (x86)\GnuWin32\bin\, C:\Program Files\nodejs\, C:\Program Files (x86)\Yarn\bin\, C:\Users\yhu\Dkits\protoc\bin\, C:\Program Files\Git\cmd, C:\Program Files\TortoiseGit\bin, C:\Program Files\TortoiseSVN\bin, C:\Program Files\Amazon\AWSCLIV2\, C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn\, C:\Dkits\Java\OpenJDK\11.0.4\bin, C:\Users\yhu\Dkits\maven\bin, C:\Users\yhu\Dkits\scala\bin, C:\Dkits\gradle\bin, C:\Users\yhu\AppData\Local\Microsoft\WindowsApps, C:\Users\yhu\AppData\Local\atom\bin, C:\Users\yhu\AppData\Local\Programs\Microsoft VS Code\bin, C:\Users\yhu\AppData\Local\GitHubDesktop\bin, C:\Users\yhu\AppData\Roaming\npm, C:\Users\yhu\AppData\Local\Yarn\bin, C:\Users\yhu\Dkits\protoc\bin, .]
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2660)
at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:829)
at java.base/java.lang.System.loadLibrary(System.java:1867)
错误原因和分析
这个错误的原因是包的冲突。
如果你的配置文件中有下面 2 个包。
这 2 个包是冲突的。
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>applicationinsights-spring-boot-starter</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>spring-cloud-azure-appconfiguration-config</artifactId>
<version>1.2.7</version>
</dependency>
所以你需要将 spring-cloud-azure-appconfiguration-config 这个包删除后才可以启动。
https://www.ossez.com/t/spring-azure-applicationinsights-tcnative/595
分类:
Java
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 【杭电多校比赛记录】2025“钉耙编程”中国大学生算法设计春季联赛(1)
2019-10-21 Git Clone 的时候遇到 Filename too long 错误