Pattern selector

Most relevant patterns first. Most helpful ones displayed. Click here to show all.

  1. MBeanExporter.afterSingletonsInstantiated() has thrown an UnableToRegisterMBeanException
    Spring Context
    4
    3
    0
  2. MBean registration error
    Spring Context
    6
    5
    1

Your stack trace compared to the selected pattern

Jump to solutionsExpand frames
org.springframework.jmx.export.UnableToRegisterMBeanException: Unable to register MBean [org.apache.tomcat.dbcp.dbcp2.BasicDataSource@49f798a4] with key 'permDbJpaDataSource'; nested exception is javax.management.InstanceAlreadyExistsException: Catalina:type=DataSource,host=localhost,context=/permDb,class=javax.sql.DataSource,name="jdbc/permDb"
    at org.springframework.jmx.export.MBeanExporter.registerBeanNameOrInstance(MBeanExporter.java:625)
    at org.springframework.jmx.export.MBeanExporter.registerBeans(MBeanExporter.java:550)
    at org.springframework.jmx.export.MBeanExporter.afterSingletonsInstantiated(MBeanExporter.java:432)

Solution

kolczagy1 month ago

This problem occurs when you are trying to register the same MBean twice under the same name. Either rename one of the instances, or do not deploy the webapp twice. Also check the code that this MBean is properly removed when a webapp is undeployed.

External results for this pattern (10)

  1. piefelvia GitHub3 weeks ago
    Unable to register MBean [HikariDataSource (DATABASE_NAME)] with key 'coachingDataSource'; nested exception is javax.management.InstanceAlreadyExistsException: MXBean already registered with name com.zaxxer.hikari:type=PoolConfig (DATABASE_NAME)
    Show stack trace
  2. Nii Fortevia Stack Overflow5 months ago
    Unable to register MBean [CachingConnectionFactory] with key 'rabbitConnectionFactory'; nested exception is javax.management.InstanceAlreadyExistsException: org.springframework.amqp.rabbit.connection:name=rabbitConnectionFactory,type=CachingConnectionFactory
    Show stack trace
  3. Unable to register MBean [HikariDataSource (HikariPool-0)] with key 'dataSource'; nested exception is javax.management.InstanceAlreadyExistsException: com.zaxxer.hikari:name=dataSource,type=HikariDataSource
    Show stack trace
  4. JimHawkinsvia Stack Overflow5 months ago
    Unable to register MBean [org.apache.tomcat.dbcp.dbcp2.BasicDataSource@49f798a4] with key 'permDbJpaDataSource'; nested exception is javax.management.InstanceAlreadyExistsException: Catalina:type=DataSource,host=localhost,context=/permDb,class=javax.sql.DataSource,name="jdbc/permDb"
    Show stack trace
  5. Unknown authorvia liferay.com5 months ago
    Error creating bean with name 'hibernateMBeanExporter' defined in class path resource [META-INF/hibernate-spring.xml]: Invocation of init method failed; nested exception is org.springframework.jmx.export.UnableToRegisterMBeanException: Unable to register MBean [com.liferay.portal.dao.orm.hibernate.jmx.HibernateStatisticsService@1eb2ae7] with key 'Hibernate:name=statistics'; nested exception is javax.management.InstanceAlreadyExistsException: Hibernate:name=statistics
    Show stack trace
  6. Unknown authorvia liferay.com5 months ago
    Error creating bean with name 'hibernateMBeanExporter' defined in class path resource [META-INF/hibernate-spring.xml]: Invocation of init method failed; nested exception is org.springframework.jmx.export.UnableToRegisterMBeanException: Unable to register MBean [com.liferay.portal.dao.orm.hibernate.jmx.HibernateStatisticsService@1eb2ae7] with key 'Hibernate:name=statistics'; nested exception is javax.management.InstanceAlreadyExistsException: Hibernate:name=statistics
    Show stack trace
  7. Unknown authorvia liferay.com5 months ago
    Error creating bean with name 'hibernateMBeanExporter' defined in class path resource [META-INF/hibernate-spring.xml]: Invocation of init method failed; nested exception is org.springframework.jmx.export.UnableToRegisterMBeanException: Unable to register MBean [com.liferay.portal.dao.orm.hibernate.jmx.HibernateStatisticsService@1eb2ae7] with key 'Hibernate:name=statistics'; nested exception is javax.management.InstanceAlreadyExistsException: Hibernate:name=statistics
    Show stack trace
  8. Unknown authorvia liferay.com5 months ago
    Error creating bean with name 'hibernateMBeanExporter' defined in class path resource [META-INF/hibernate-spring.xml]: Invocation of init method failed; nested exception is org.springframework.jmx.export.UnableToRegisterMBeanException: Unable to register MBean [com.liferay.portal.dao.orm.hibernate.jmx.HibernateStatisticsService@1eb2ae7] with key 'Hibernate:name=statistics'; nested exception is javax.management.InstanceAlreadyExistsException: Hibernate:name=statistics
    Show stack trace
  9. Unknown authorvia liferay.com5 months ago
    Error creating bean with name 'hibernateMBeanExporter' defined in class path resource [META-INF/hibernate-spring.xml]: Invocation of init method failed; nested exception is org.springframework.jmx.export.UnableToRegisterMBeanException: Unable to register MBean [com.liferay.portal.dao.orm.hibernate.jmx.HibernateStatisticsService@1eb2ae7] with key 'Hibernate:name=statistics'; nested exception is javax.management.InstanceAlreadyExistsException: Hibernate:name=statistics
    Show stack trace
  10. jmandawgvia GitHub5 months ago
    Unable to register MBean [org.springframework.cloud.context.environment.EnvironmentManager@76d00da2] with key 'environmentManager'; nested exception is javax.management.InstanceAlreadyExistsException: org.springframework.cloud.context.environment:name=environmentManager,type=EnvironmentManager
    Show stack trace