博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
MXBean already registered报错解决
阅读量:4161 次
发布时间:2019-05-26

本文共 1348 字,大约阅读时间需要 4 分钟。

启动springboot项目失败,报如下错误!

 

at com.aiways.boss.AiwaysBossVoiceServiceApplication.main(AiwaysBossVoiceServiceApplication.java:25)Caused by: javax.management.InstanceAlreadyExistsException: MXBean already registered with name org.apache.commons.pool2:type=GenericKeyedObjectPool,name=pool	at com.sun.jmx.mbeanserver.MXBeanLookup.addReference(MXBeanLookup.java:151)	at com.sun.jmx.mbeanserver.MXBeanSupport.register(MXBeanSupport.java:160)	at com.sun.jmx.mbeanserver.MBeanSupport.preRegister2(MBeanSupport.java:173)	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:930)	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:900)	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:324)	at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:522)	at org.springframework.jmx.support.MBeanRegistrationSupport.doRegister(MBeanRegistrationSupport.java:195)	at org.springframework.jmx.export.MBeanExporter.registerBeanInstance(MBeanExporter.java:674)	at org.springframework.jmx.export.MBeanExporter.registerBeanNameOrInstance(MBeanExporter.java:618)

MXBean already registered,bean已经被注册。

 

解决方法:

启动类加上:

@EnableMBeanExport(registration = RegistrationPolicy.IGNORE_EXISTING)

转载地址:http://pfjxi.baihongyu.com/

你可能感兴趣的文章
IntelliJ IDAE 2018.2 汉化
查看>>
Openwrt源码下载与编译
查看>>
rootkit related
查看>>
配置文件的重要性------轻化操作
查看>>
又是缓存惹的祸!!!
查看>>
为什么要实现程序指令和程序数据的分离?
查看>>
我对C++ string和length方法的一个长期误解------从protobuf序列化说起(没处理好会引起数据丢失、反序列化失败哦!)
查看>>
无protobuf协议情况下的反序列化------貌似无解, 其实有解!
查看>>
make -n(仅列出命令, 但不会执行)用于调试makefile
查看>>
go语言如何从终端逐行读取数据?------用bufio包
查看>>
go的值类型和引用类型------重要的概念
查看>>
求二叉树中结点的最大值(所有结点的值都是正整数)
查看>>
用go的flag包来解析命令行参数
查看>>
来玩下go的http get
查看>>
队列和栈的本质区别
查看>>
matlab中inline的用法
查看>>
如何用matlab求函数的最值?
查看>>
Git从入门到放弃
查看>>
java8采用stream对集合的常用操作
查看>>
EasySwift/YXJOnePixelLine 极其方便的画出真正的一个像素的线
查看>>