org.springframework.jmx.export.UnableToRegisterMBeanException: Unable to register MBean

14 views
Skip to first unread message

Javier Sanz

unread,
Sep 24, 2025, 8:05:58 AM (3 days ago) Sep 24
to WildFly
Hello,

I  am trying to deploy a ear artifact with 4 wars running Java 8, Spring framework running on  WildFly 22.

I am trying to know why  I get an error:

- org.springframework.jmx.export.UnableToRegisterMBeanException: Unable to register MBean
- javax.management.InstanceAlreadyExistsException

Because, 4 wars deployment on boot trying to register the same mbean name into jmx server and it seems it is no valid.  

MBean are register unique by deploy process?

Log shows:
2025-09-24 11:25:13,956 INFO  [org.jboss.modules] (main) JBoss Modules version 1.11.0.Final
2025-09-24 11:25:14,301 INFO  [org.jboss.msc] (main) JBoss MSC version 1.4.12.Final
2025-09-24 11:25:14,309 INFO  [org.jboss.threads] (main) JBoss Threads version 2.4.0.Final
2025-09-24 11:25:14,400 INFO  [org.jboss.as] (MSC service thread 1-2) WFLYSRV0049: WildFly Full 22.0.1.Final (WildFly Core 14.0.1.Final) starting
2025-09-24 11:25:14,402 DEBUG [org.jboss.as.config] (MSC service thread 1-2) Configured system properties:

<....>
Caused by: java.lang.RuntimeException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'exporter' defined in "/opt/jboss/wildfly/standalone/deployments/shared.war/WEB-INF/lib/shared-spring-core.jar/META-INF/shared-spring/applicationContext-SharedSpring-Monitor.xml": Invocation of init method failed; nested exception is org.springframework.jmx.export.UnableToRegisterMBeanException: Unable to register MBean [shared.monitoring.AdapterHTTP-66b8ea3b] with key 'httpAdapter'; nested exception is javax.management.InstanceAlreadyExistsException: ArcSpring:name=Adapter HTTP para JMX,modulo=a1,aplicacion=all-ear
at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:257)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:96)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:78)
... 8 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'exporter' defined in "/opt/jboss/wildfly/standalone/deployments/shared.war/WEB-INF/lib/shared-spring-core.jar/META-INF/shared-spring/applicationContext-SharedSpring-Monitor.xml": Invocation of init method failed; nested exception is org.springframework.jmx.export.UnableToRegisterMBeanException: Unable to register MBean [shared.monitoring.AdapterHTTP-66b8ea3b] with key 'httpAdapter'; nested exception is javax.management.InstanceAlreadyExistsException: ArcSpring:name=Adapter HTTP for JMX,module=a1,aplication=all-ear
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1455)


How can I fix it?  something about wilfdfly config deploy ears ?

Tx

James Perkins

unread,
Sep 24, 2025, 8:28:24 PM (2 days ago) Sep 24
to WildFly
We're missing some of the stack trace, but this is being thrown by Spring it looks like. I'm not too familiar with Spring, but I would start looking there.
Reply all
Reply to author
Forward
0 new messages