org.springframework.beans.factory.BeanCreationException

Error creating bean with name 'org.springframework.boot.autoconfigure.admin.SpringApplicationAdminJmxAutoConfiguration': Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.autoconfigure.admin.SpringApplicationAdminJmxAutoConfiguration$$EnhancerBySpringCGLIB$$a2ce2574]: Constructor threw exception; nested exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type [org.springframework.jmx.export.MBeanExporter] is defined: expected single matching bean but found 2: mbeanExporter,endpointMBeanExporter

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web10

  • via Unknown by Andy Wilkinson,
  • via Unknown by Andy Wilkinson,
  • Stack trace

    • org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.boot.autoconfigure.admin.SpringApplicationAdminJmxAutoConfiguration': Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.autoconfigure.admin.SpringApplicationAdminJmxAutoConfiguration$$EnhancerBySpringCGLIB$$a2ce2574]: Constructor threw exception; nested exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type [org.springframework.jmx.export.MBeanExporter] is defined: expected single matching bean but found 2: mbeanExporter,endpointMBeanExporter at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:279)[spring-beans-4.3.0.RC1.jar:4.3.0.RC1] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1143)[spring-beans-4.3.0.RC1.jar:4.3.0.RC1] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1046)[spring-beans-4.3.0.RC1.jar:4.3.0.RC1] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510)[spring-beans-4.3.0.RC1.jar:4.3.0.RC1] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)[spring-beans-4.3.0.RC1.jar:4.3.0.RC1] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)[spring-beans-4.3.0.RC1.jar:4.3.0.RC1] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)[spring-beans-4.3.0.RC1.jar:4.3.0.RC1] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)[spring-beans-4.3.0.RC1.jar:4.3.0.RC1] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)[spring-beans-4.3.0.RC1.jar:4.3.0.RC1] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:775)[spring-beans-4.3.0.RC1.jar:4.3.0.RC1] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:841)[spring-context-4.3.0.RC1.jar:4.3.0.RC1] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:540)[spring-context-4.3.0.RC1.jar:4.3.0.RC1] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:765)[classes/:na] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:370)[classes/:na] at org.springframework.boot.SpringApplication.run(SpringApplication.java:314)[classes/:na] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1182)[classes/:na] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1171)[classes/:na] at com.example.Gh5682Application.main(Gh5682Application.java:12)[classes/:na] Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.autoconfigure.admin.SpringApplicationAdminJmxAutoConfiguration$$EnhancerBySpringCGLIB$$a2ce2574]: Constructor threw exception; nested exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type [org.springframework.jmx.export.MBeanExporter] is defined: expected single matching bean but found 2: mbeanExporter,endpointMBeanExporter at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:163)[spring-beans-4.3.0.RC1.jar:4.3.0.RC1] at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:122)[spring-beans-4.3.0.RC1.jar:4.3.0.RC1] at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:271)[spring-beans-4.3.0.RC1.jar:4.3.0.RC1] ... 17 more Caused by: org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type [org.springframework.jmx.export.MBeanExporter] is defined: expected single matching bean but found 2: mbeanExporter,endpointMBeanExporter at org.springframework.beans.factory.config.DependencyDescriptor.resolveNotUnique(DependencyDescriptor.java:172)[spring-beans-4.3.0.RC1.jar:4.3.0.RC1] at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1059)[spring-beans-4.3.0.RC1.jar:4.3.0.RC1] at org.springframework.beans.factory.support.DefaultListableBeanFactory$DependencyObjectProvider.getIfAvailable(DefaultListableBeanFactory.java:1544)[spring-beans-4.3.0.RC1.jar:4.3.0.RC1] at org.springframework.boot.autoconfigure.admin.SpringApplicationAdminJmxAutoConfiguration.<init>(SpringApplicationAdminJmxAutoConfiguration.java:63)[classes/:na] at org.springframework.boot.autoconfigure.admin.SpringApplicationAdminJmxAutoConfiguration$$EnhancerBySpringCGLIB$$a2ce2574.<init>(<generated>)[classes/:na] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)[na:1.8.0_60] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)[na:1.8.0_60] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)[na:1.8.0_60] at java.lang.reflect.Constructor.newInstance(Constructor.java:422)[na:1.8.0_60] at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:147)[spring-beans-4.3.0.RC1.jar:4.3.0.RC1] ... 19 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    AxeloAxelo
    2 times, last one
    pulse00pulse00
    6 times, last one
    Andreas HäberAndreas Häber
    12 times, last one
    tomthomastomthomas
    13 times, last one
    ifercaiferca
    30 times, last one
    1 more bugmates