启动Maven项目 Unregistering JMX-exposed beans on shutdown 解决办法

启动Maven项目 Unregistering JMX-exposed beans on shutdown   解决办法

 

解决办法:

pom.xml添加一下代码

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
</dependency>

运行成功了

 

测试成功

已标记关键词 清除标记
Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled. 2020-03-28 16:48:23,155:INFO restartedMain (AbstractApplicationContext.java:984) - Closing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@29e05166: startup date [Sat Mar 28 16:48:19 CST 2020]; parent: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@20203cbd 2020-03-28 16:48:24,403:ERROR restartedMain (SpringApplication.java:771) - Application startup failed java.lang.NoSuchMethodError: com.sun.jna.platform.win32.OleAuto.VariantClear(Lcom/sun/jna/platform/win32/Variant$VARIANT;)Lcom/sun/jna/platform/win32/WinNT$HRESULT; at oshi.util.platform.windows.WmiUtil.enumerateProperties(WmiUtil.java:561) ~[oshi-core-3.4.4.jar:3.4.4] at oshi.util.platform.windows.WmiUtil.queryWMI(WmiUtil.java:333) ~[oshi-core-3.4.4.jar:3.4.4] at oshi.util.platform.windows.WmiUtil.selectStringFrom(WmiUtil.java:214) ~[oshi-core-3.4.4.jar:3.4.4] at oshi.hardware.platform.windows.WindowsCentralProcessor.initVars(WindowsCentralProcessor.java:93) ~[oshi-core-3.4.4.jar:3.4.4] at oshi.hardware.platform.windows.WindowsCentralProcessor.<init>(WindowsCentralProcessor.java:63) ~[oshi-core-3.4.4.jar:3.4.4] at oshi.hardware.platform.windows.WindowsHardwareAbstractionLayer.getProcessor(WindowsHardwareAbstractionLayer.java:64) ~[oshi-core-3.4.4.jar:3.4.4] at com.apexsoft.aas.actuator.AasInfoContributor$1$1$1.<init>(AasInfoContributor.java:72) ~[aas-common-1.3.1-SNAPSHOT.jar:?] at com.apexsoft.aas.actuator.AasInfoContributor$1$1.<init>(AasInfoContributor.java:71) ~[aas-common-1.3.1-SNAPSHOT.jar:?] at com.apexsoft.aas.actuator.AasInfoContributor$1.<init>(AasInfoContributor.java:69) ~[aas-common-1.3.1-SNAPSHOT.jar:?] at com.apexsoft.aas.actuator.AasInfoContributor.readSystemInfo(AasInfoContributor.java:68) ~[aas-common-1.3.1-SNAPSHOT.jar:?] at com.apexsoft.aas.actuator.systeminfo.SystemInfoFetchThread.run(SystemInfoFetchThread.java:41) ~[aas-common-1.3.1-SNAPSHOT.jar:?] at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:723) ~[spring-boot-1.5.12.RELEASE.jar:1.5.12.RELEASE] at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:713) [spring-boot-1.5.12.RELEASE.jar:1.5.12.RELEASE] at org.springframework.boot.SpringApplication.afterRefresh(SpringApplication.java:703) [spring-boot-1.5.12.RELEASE.jar:1.5.12.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:304) [spring-boot-1.5.12.RELEASE.jar:1.5.12.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118) [spring-boot-1.5.12.RELEASE.jar:1.5.12.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107) [spring-boot-1.5.12.RELEASE.jar:1.5.12.RELEASE] at com.apexsoft.WebApplication.main(WebApplication.java:22) [classes/:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_162] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_162] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_162] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_162] at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) [spring-boot-devtools-1.5.12.RELEASE.jar:1.5.12.RELEASE] 2020-03-28 16:48:24,410:INFO restartedMain (AbstractApplicationContext.java:984) - Closing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@20203cbd: startup date [Sat Mar 28 16:48:01 CST 2020]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@2dc67489 2020-03-28 16:48:24,412:INFO restartedMain (DefaultLifecycleProcessor.java:356) - Stopping beans in phase 2147483647 2020-03-28 16:48:24,479:INFO restartedMain (DefaultLifecycleProcessor.java:356) - Stopping beans in phase 0 2020-03-28 16:48:24,480:INFO restartedMain (MBeanExporter.java:449) - Unregistering JMX-exposed beans on shutdown 2020-03-28 16:48:24,481:INFO restartedMain (MBeanRegistrationSupport.java:241) - Unregistering JMX-exposed beans 2020-03-28 16:48:24,481:INFO restartedMain (MBeanExporter.java:449) - Unregistering JMX-exposed beans on shutdown 2020-03-28 16:48:24,481:INFO restartedMain (MBeanRegistrationSupport.java:241) - Unregistering JMX-exposed beans 2020-03-28 16:48:25,001:INFO ThreadPoolTaskScheduler-2 (StartupRunner.java:183) - request worker bee prepare 2020-03-28 16:48:25,002:INFO ThreadPoolTaskScheduler-2 (StartupRunner.java:188) - request worker bee prepare: envInfo 2020-03-28 16:48:25,006:INFO ThreadPoolTaskScheduler-2 (StartupRunner.java:192) - request worker bee prepare: healthInfo 2020-03-28 16:48:25,010:INFO ThreadPoolTaskScheduler-2 (StartupRunner.java:196) - request worker bee start 2020-03-28 16:48:25,219:ERROR ThreadPoolTaskScheduler-2 (StartupRunner.java:211) - UNAVAILABLE: Could not find server: 192.168.3.133:2181 io.grpc.StatusRuntimeException: UNAVAILABLE: Could not find server: 192.168.3.159:3191 at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:235) ~[grpc-stub-1.21.0.jar:1.21.0] at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:216) ~[grpc-stub-1.21.0.jar:1.21.0] at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:141) ~[grpc-stub-1.21.0.jar:1.21.0] at com.apex.ams.common.CommonGrpc$CommonBlockingStub.handle(CommonGrpc.java:358) ~[aas-protocol-1.3.1-SNAPSHOT.jar:?] at com.apex.ams.util.AasCommService.sendRequest(AasCommService.java:172) ~[aas-protocol-1.3.1-SNAPSHOT.jar:?] at com.apexsoft.aas.actuator.StartupRunner.lambda$startReadSystemInfoTask$1(StartupRunner.java:197) ~[aas-common-1.3.1-SNAPSHOT.jar:?] at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) [spring-context-4.3.16.RELEASE.jar:4.3.16.RELEASE] at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81) [spring-context-4.3.16.RELEASE.jar:4.3.16.RELEASE] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_162] at java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:266) [?:1.8.0_162] at java.util.concurrent.FutureTask.run(FutureTask.java) [?:1.8.0_162] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_162] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:1.8.0_162] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_162] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_162] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_162] 2020-03-28 16:48:26,696:INFO restartedMain (ShutDownHook.java:48) - Start to close global resource due to priority 2020-03-28 16:48:26,700:INFO restartedMain (ShutDownHook.java:55) - Success to close class com.apex.ams.client.AmsServiceManager 2020-03-28 16:48:26,700:INFO restartedMain (ShutDownHook.java:57) - Success to close all the resource! 2020-03-28 16:48:26,700:INFO restartedMain (ExecutorConfigurationSupport.java:202) - Shutting down ExecutorService 2020-03-28 16:48:27,512:INFO Thread-24 (ShutDownHook.java:48) - Start to close global resource due to priority 2020-03-28 16:48:27,512:INFO Thread-24 (ShutDownHook.java:57) - Success to close all the resource! Disconnected from the target VM, address: '127.0.0.1:50392', transport: 'socket' Process finished with exit code 1 ![图片说明](https://img-ask.csdn.net/upload/202003/28/1585385550_236073.png)![图片说明](https://img-ask.csdn.net/upload/202003/28/1585385563_763087.png)![图片说明](https://img-ask.csdn.net/upload/202003/28/1585385577_311794.png)![图片说明](https://img-ask.csdn.net/upload/202003/28/1585385871_267904.png)![图片说明](https://img-ask.csdn.net/upload/202003/28/1585385881_719731.png) ``` ```
©️2020 CSDN 皮肤主题: 数字20 设计师:CSDN官方博客 返回首页