在我的Spring Boot应用程序中运行Azure应用程序洞察代理时,我不断收到IlLegalStateException
我的Spring Boot应用运行正常,日志被正确推送到Azure应用程序洞察。但由于未映射的关系,我一直看到IlLegalStateException,几乎每分钟都会填满我的控制台。我想不出这个错误的原因是什么。以下是完整的堆栈跟踪。如果有人知道如何修复或抑制此问题。
java -javaagent:C:Users********DocumentsHUBJavahub_apiuildapplicationinsights-agent-3.1.1.jar -jar C:Users********DocumentsHUBJavahub_apiuildlibshub_api-0.0.1-SNAPSHOT.jar
2021-09-03 13:40:14.714+05 INFO c.m.applicationinsights.agent - ApplicationInsights Java Agent 3.1.1 started successfully
. ____ _ __ _ _
/\ / ___'_ __ _ _(_)_ __ __ _
( ( )\___ | '_ | '_| | '_ / _` |
\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.6.0-SNAPSHOT)
2021-09-03 13:40:17.343 INFO 6496 --- [ main] c.h.HubApplication : Starting HubApplication using Java 11.0.12 on DESKTOP-******* with PID **** (C:Users********DocumentsHUBJavahub_apiuildlibshub_api-0.0.1-SNAPSHOT.jar started by husarkar in C:Users********DocumentsHUBJavahub_api)
2021-09-03 13:40:17.359 INFO 6496 --- [ main] c.h.HubApplication : No active profile set, falling back to default profiles: default
2021-09-03 13:40:18.964 INFO 6496 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2021-09-03 13:40:19.073 INFO 6496 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 94 ms. Found 1 JPA repository interfaces.
2021-09-03 13:40:20.050 INFO 6496 --- [ main] o.s.b.w.e.t.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
2021-09-03 13:40:20.078 INFO 6496 --- [ main] o.a.c.c.StandardService : Starting service [Tomcat]
2021-09-03 13:40:20.079 INFO 6496 --- [ main] o.a.c.c.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.52]
2021-09-03 13:40:20.200 INFO 6496 --- [ main] o.a.c.c.C.[.[.[/api] : Initializing Spring embedded WebApplicationContext
2021-09-03 13:40:20.200 INFO 6496 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 2756 m
2021-09-03 13:40:20.774 INFO 6496 --- [ main] o.h.j.i.u.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default]
2021-09-03 13:40:20.932 INFO 6496 --- [ main] o.h.Version : HHH000412: Hibernate ORM core version 5.5.6.Final
2021-09-03 13:40:21.277 INFO 6496 --- [ main] o.h.a.c.Version : HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
2021-09-03 13:40:21.536 INFO 6496 --- [ main] c.z.h.HikariDataSource : HikariPool-1 - Starting...
2021-09-03 13:40:23.563 INFO 6496 --- [ main] c.z.h.HikariDataSource : HikariPool-1 - Start completed.
2021-09-03 13:40:23.626 INFO 6496 --- [ main] o.h.d.Dialect : HHH000400: Using dialect: org.hibernate.dialect.SQLServer2012Dialect
2021-09-03 13:40:24.936 INFO 6496 --- [ main] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
2021-09-03 13:40:24.950 INFO 6496 --- [ main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2021-09-03 13:40:25.417 WARN 6496 --- [ main] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
2021-09-03 13:40:25.970 INFO 6496 --- [ main] o.s.b.w.e.t.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path '/api
2021-09-03 13:40:25.981 INFO 6496 --- [ main] c.h.HubApplication : Started HubApplication in 9.538 seconds (JVM running for 13.477)
2021-09-03 13:41:13.942+05 ERROR c.m.a.i.p.PerformanceCounterContainer - Exception while reporting performance counter 'JSDK_OshiPerformanceCounter'
java.lang.IllegalStateException: Unmapped relationship: 7
at com.sun.jna.platform.win32.WinNT$SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX.fromPointer(WinNT.java:3033)
at com.sun.jna.platform.win32.Kernel32Util.getLogicalProcessorInformationEx(Kernel32Util.java:715)
at oshi.driver.windows.LogicalProcessorInformation.getLogicalProcessorInformationEx(LogicalProcessorInformation.java:61)
at oshi.hardware.platform.windows.WindowsCentralProcessor.initProcessorCounts(WindowsCentralProcessor.java:155)
at oshi.hardware.common.AbstractCentralProcessor.<init>(AbstractCentralProcessor.java:74)
at oshi.hardware.platform.windows.WindowsCentralProcessor.<init>(WindowsCentralProcessor.java:66)
at oshi.hardware.platform.windows.WindowsHardwareAbstractionLayer.createProcessor(WindowsHardwareAbstractionLayer.java:60)
at oshi.util.Memoizer$1.get(Memoizer.java:87)
at oshi.hardware.common.AbstractHardwareAbstractionLayer.getProcessor(AbstractHardwareAbstractionLayer.java:68)
at com.microsoft.applicationinsights.internal.perfcounter.OshiPerformanceCounter.report(OshiPerformanceCounter.java:60)
at com.microsoft.applicationinsights.internal.perfcounter.PerformanceCounterContainer$1.run(PerformanceCounterContainer.java:231)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Thread.java:834)
2021-09-03 13:42:13.597+05 ERROR c.m.a.i.p.PerformanceCounterContainer - Exception while reporting performance counter 'JSDK_OshiPerformanceCounter'
java.lang.IllegalStateException: Unmapped relationship: 7
at com.sun.jna.platform.win32.WinNT$SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX.fromPointer(WinNT.java:3033)
at com.sun.jna.platform.win32.Kernel32Util.getLogicalProcessorInformationEx(Kernel32Util.java:715)
at oshi.driver.windows.LogicalProcessorInformation.getLogicalProcessorInformationEx(LogicalProcessorInformation.java:61)
at oshi.hardware.platform.windows.WindowsCentralProcessor.initProcessorCounts(WindowsCentralProcessor.java:155)
at oshi.hardware.common.AbstractCentralProcessor.<init>(AbstractCentralProcessor.java:74)
at oshi.hardware.platform.windows.WindowsCentralProcessor.<init>(WindowsCentralProcessor.java:66)
at oshi.hardware.platform.windows.WindowsHardwareAbstractionLayer.createProcessor(WindowsHardwareAbstractionLayer.java:60)
at oshi.util.Memoizer$1.get(Memoizer.java:87)
at oshi.hardware.common.AbstractHardwareAbstractionLayer.getProcessor(AbstractHardwareAbstractionLayer.java:68)
at com.microsoft.applicationinsights.internal.perfcounter.OshiPerformanceCounter.report(OshiPerformanceCounter.java:60)
at com.microsoft.applicationinsights.internal.perfcounter.PerformanceCounterContainer$1.run(PerformanceCounterContainer.java:231)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Thread.java:834)
2021-09-03 13:43:13.611+05 ERROR c.m.a.i.p.PerformanceCounterContainer - Exception while reporting performance counter 'JSDK_OshiPerformanceCounter'
java.lang.IllegalStateException: Unmapped relationship: 7
at com.sun.jna.platform.win32.WinNT$SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX.fromPointer(WinNT.java:3033)
at com.sun.jna.platform.win32.Kernel32Util.getLogicalProcessorInformationEx(Kernel32Util.java:715)
at oshi.driver.windows.LogicalProcessorInformation.getLogicalProcessorInformationEx(LogicalProcessorInformation.java:61)
at oshi.hardware.platform.windows.WindowsCentralProcessor.initProcessorCounts(WindowsCentralProcessor.java:155)
at oshi.hardware.common.AbstractCentralProcessor.<init>(AbstractCentralProcessor.java:74)
at oshi.hardware.platform.windows.WindowsCentralProcessor.<init>(WindowsCentralProcessor.java:66)
at oshi.hardware.platform.windows.WindowsHardwareAbstractionLayer.createProcessor(WindowsHardwareAbstractionLayer.java:60)
at oshi.util.Memoizer$1.get(Memoizer.java:87)
at oshi.hardware.common.AbstractHardwareAbstractionLayer.getProcessor(AbstractHardwareAbstractionLayer.java:68)
at com.microsoft.applicationinsights.internal.perfcounter.OshiPerformanceCounter.report(OshiPerformanceCounter.java:60)
at com.microsoft.applicationinsights.internal.perfcounter.PerformanceCounterContainer$1.run(PerformanceCounterContainer.java:231)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Thread.java:834)
2021-09-03 13:44:13.585+05 ERROR c.m.a.i.p.PerformanceCounterContainer - Exception while reporting performance counter 'JSDK_OshiPerformanceCounter'
java.lang.IllegalStateException: Unmapped relationship: 7
at com.sun.jna.platform.win32.WinNT$SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX.fromPointer(WinNT.java:3033)
at com.sun.jna.platform.win32.Kernel32Util.getLogicalProcessorInformationEx(Kernel32Util.java:715)
at oshi.driver.windows.LogicalProcessorInformation.getLogicalProcessorInformationEx(LogicalProcessorInformation.java:61)
at oshi.hardware.platform.windows.WindowsCentralProcessor.initProcessorCounts(WindowsCentralProcessor.java:155)
at oshi.hardware.common.AbstractCentralProcessor.<init>(AbstractCentralProcessor.java:74)
at oshi.hardware.platform.windows.WindowsCentralProcessor.<init>(WindowsCentralProcessor.java:66)
at oshi.hardware.platform.windows.WindowsHardwareAbstractionLayer.createProcessor(WindowsHardwareAbstractionLayer.java:60)
at oshi.util.Memoizer$1.get(Memoizer.java:87)
at oshi.hardware.common.AbstractHardwareAbstractionLayer.getProcessor(AbstractHardwareAbstractionLayer.java:68)
at com.microsoft.applicationinsights.internal.perfcounter.OshiPerformanceCounter.report(OshiPerformanceCounter.java:60)
at com.microsoft.applicationinsights.internal.perfcounter.PerformanceCounterContainer$1.run(PerformanceCounterContainer.java:231)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Thread.java:834)
2021-09-03 13:45:13.548+05 ERROR c.m.a.i.p.PerformanceCounterContainer - Exception while reporting performance counter 'JSDK_OshiPerformanceCounter'
java.lang.IllegalStateException: Unmapped relationship: 7
at com.sun.jna.platform.win32.WinNT$SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX.fromPointer(WinNT.java:3033)
at com.sun.jna.platform.win32.Kernel32Util.getLogicalProcessorInformationEx(Kernel32Util.java:715)
at oshi.driver.windows.LogicalProcessorInformation.getLogicalProcessorInformationEx(LogicalProcessorInformation.java:61)
at oshi.hardware.platform.windows.WindowsCentralProcessor.initProcessorCounts(WindowsCentralProcessor.java:155)
at oshi.hardware.common.AbstractCentralProcessor.<init>(AbstractCentralProcessor.java:74)
at oshi.hardware.platform.windows.WindowsCentralProcessor.<init>(WindowsCentralProcessor.java:66)
at oshi.hardware.platform.windows.WindowsHardwareAbstractionLayer.createProcessor(WindowsHardwareAbstractionLayer.java:60)
at oshi.util.Memoizer$1.get(Memoizer.java:87)
at oshi.hardware.common.AbstractHardwareAbstractionLayer.getProcessor(AbstractHardwareAbstractionLayer.java:68)
at com.microsoft.applicationinsights.internal.perfcounter.OshiPerformanceCounter.report(OshiPerformanceCounter.java:60)
at com.microsoft.applicationinsights.internal.perfcounter.PerformanceCounterContainer$1.run(PerformanceCounterContainer.java:231)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Thread.java:834)
解决方案
2021-09-03 13:41:13.942+05错误c.m.a.i.p.PerformanceCounterContainer
- 报告性能计数器‘JSDK_OshiPerformanceCounter’java.lang.IlLegalStateException时异常: 未映射关系:7 在com.sun.jna.platform.win32.WinNT$SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX.fromPointer(WinNT.java:3033) 在com.sun.jna.platform.win32.Kernel32Util.getLogicalProcessorInformationEx(Kernel32Util.java:715)
基于上述共享堆栈错误消息看起来像是";的问题Windows正在向Logical_Processor_Relationship枚举添加新的关系值&q;&;此问题正在下面的Git Hub社区中积极讨论。 https://github.com/java-native-access/jna/issues/1324
我建议您仔细阅读并更新Git Hub讨论(如果您遇到此问题)。
相关文章