]
Katia Aresti updated ISPN-10122:
--------------------------------
Status: Resolved (was: Pull Request Sent)
Resolution: Done
Unable to start application using Infinispan on Client/Server mode
with JMX enabled
-----------------------------------------------------------------------------------
Key: ISPN-10122
URL:
https://issues.jboss.org/browse/ISPN-10122
Project: Infinispan
Issue Type: Bug
Components: Spring Integration
Reporter: Katia Aresti
Assignee: Katia Aresti
Priority: Major
A Spring-Boot application using Infinispan Client/Server with JMX enabled for the
Infinispan Client won't start, unless you disable jmx spring.jmx.enabled=false.
Infinispan already registers a bean that is registered by Spring, so we get the following
exception on start:
{code}
org.springframework.jmx.export.UnableToRegisterMBeanException: Unable to register MBean
[org.infinispan.client.hotrod.RemoteCacheManager@1d67f4e9] with key
'remoteCacheManager'; nested exception is
javax.management.InstanceAlreadyExistsException: MXBean already registered with name
org.infinispan:type=HotRodClient,name=Default
at
org.springframework.jmx.export.MBeanExporter.registerBeanNameOrInstance(MBeanExporter.java:625)
~[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at
org.springframework.jmx.export.MBeanExporter.lambda$registerBeans$2(MBeanExporter.java:551)
~[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at java.base/java.util.HashMap.forEach(HashMap.java:1336) ~[na:na]
at org.
{code}
https://github.com/spring-projects/spring-boot/issues/16482