org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'healthCheckerController' defined in file [/Users/philippesouzamoraesribeiro/Documents/workspace/cloudos/target/classes/cloudos/HealthCheckerController.class]: Unsatisfied dependency expressed through constructor parameter 0: No qualifying bean of type [healthchecker.InstanceRepository] found for dependency [healthchecker.InstanceRepository]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [healthchecker.InstanceRepository] found for dependency [healthchecker.InstanceRepository]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}

Stack Overflow | cybertextron | 3 months ago
  1. 0

    Unsatisfied dependency expressed through constructor parameter 0: No qualifying bean of type - Spring boot

    Stack Overflow | 3 months ago | cybertextron
    org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'healthCheckerController' defined in file [/Users/philippesouzamoraesribeiro/Documents/workspace/cloudos/target/classes/cloudos/HealthCheckerController.class]: Unsatisfied dependency expressed through constructor parameter 0: No qualifying bean of type [healthchecker.InstanceRepository] found for dependency [healthchecker.InstanceRepository]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [healthchecker.InstanceRepository] found for dependency [healthchecker.InstanceRepository]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}
  2. 0

    No qualified bean found for dependency - Java

    Stack Overflow | 3 months ago | cybertextron
    org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'buildsController' defined in file [/Users/philipperibeiro/Documents/workspace/cloudos/target/classes/cloudos/BuildsController.class]: Unsatisfied dependency expressed through constructor parameter 0: No qualifying bean of type [builds.BuildsRepository] found for dependency [builds.BuildsRepository]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [builds.BuildsRepository] found for dependency [builds.BuildsRepository]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}
  3. 0

    Compatible issue encountered with Spring Boot 1.4.0.M2 and Spring 4.3.RC

    GitHub | 8 months ago | hantsy
    org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'documentationPluginsBootstrapper' defined in URL [jar:file:/E:/Users/hantsy/.m2/repository/io/springfox/springfox-spring-web/2.4.0/springfox-spring-web-2.4.0.jar!/springfox/documentation/spring/web/plugins/DocumentationPluginsBootstrapper.class]: Unsatisfied dependency expressed through constructor parameter 1: Error creating bean with name 'webMvcRequestHandlerProvider' defined in URL [jar:file:/E:/Users/hantsy/.m2/repository/io/springfox/springfox-spring-web/2.4.0/springfox-spring-web-2.4.0.jar!/springfox/documentation/spring/web/plugins/WebMvcRequestHandlerProvider.class]: Unsatisfied dependency expressed through constructor parameter 0: No qualifying bean of type [java.util.List] found for dependency [java.util.List<org.springframework.web.servlet.mvc.method.RequestMappingInfoHandlerMapping>]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [java.util.List] found for dependency [java.util.List<org.springframework.web.servlet.mvc.method.RequestMappingInfoHandlerMapping>]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'webMvcRequestHandlerProvider' defined in URL [jar:file:/E:/Users/hantsy/.m2/repository/io/springfox/springfox-spring-web/2.4.0/springfox-spring-web-2.4.0.jar!/springfox/documentation/spring/web/plugins/WebMvcRequestHandlerProvider.class]: Unsatisfied dependency expressed through constructor parameter 0: No qualifying bean of type [java.util.List] found for dependency [java.util.List<org.springframework.web.servlet.mvc.method.RequestMappingInfoHandlerMapping>]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [java.util.List] found for dependency [java.util.List<org.springframework.web.servlet.mvc.method.RequestMappingInfoHandlerMapping>]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    @JsonTest does not load ApplicaitonContext correctly.

    GitHub | 7 months ago | hantsy
    org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'com.hantsylabs.restexample.springmvc.Application$ApplicationSecurity': Unsatisfied dependency expressed through constructor parameter 0: No qualifying bean of type [com.hantsylabs.restexample.springmvc.repository.UserRepository] found for dependency [com.hantsylabs.restexample.springmvc.repository.UserRepository]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.hantsylabs.restexample.springmvc.repository.UserRepository] found for dependency [com.hantsylabs.restexample.springmvc.repository.UserRepository]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}
  6. 0

    Springboot Postgresql datasource autowiring from properties file

    Stack Overflow | 3 months ago | Tyler Whalen
    org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'com.tjwhalen.game.Application$AppConfig': Unsatisfied dependency expressed through field 'dataSource': No qualifying bean of type [javax.sql.DataSource] found for dependency [javax.sql.DataSource]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [javax.sql.DataSource] found for dependency [javax.sql.DataSource]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. org.springframework.beans.factory.NoSuchBeanDefinitionException

    No qualifying bean of type [healthchecker.InstanceRepository] found for dependency [healthchecker.InstanceRepository]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}

    at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoMatchingBeanFound()
  2. Spring Beans
    DefaultListableBeanFactory.preInstantiateSingletons
    1. org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoMatchingBeanFound(DefaultListableBeanFactory.java:1406)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    2. org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1057)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    3. org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1019)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    4. org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:835)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    5. org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:741)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    6. org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:189)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    7. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1143)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    8. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1046)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    9. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    10. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    11. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    12. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    13. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    14. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    15. org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:776)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    15 frames
  3. Spring Context
    AbstractApplicationContext.refresh
    1. org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:861)[spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    2. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:541)[spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    2 frames
  4. Spring Boot
    SpringApplication.run
    1. org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]
    2. org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:369)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]
    3. org.springframework.boot.SpringApplication.run(SpringApplication.java:313)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]
    3 frames
  5. org.springframework.boot
    SpringBootContextLoader.loadContext
    1. org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:111)[spring-boot-test-1.4.0.RELEASE.jar:1.4.0.RELEASE]
    1 frame
  6. org.springframework.test
    DefaultCacheAwareContextLoaderDelegate.loadContext
    1. org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:98)[spring-test-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    2. org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:116)[spring-test-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    2 frames
  7. Spring TestContext
    SpringJUnit4ClassRunner$1.runReflectiveCall
    1. org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:83)[spring-test-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    2. org.springframework.test.context.web.ServletTestExecutionListener.setUpRequestContextIfNecessary(ServletTestExecutionListener.java:189)[spring-test-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    3. org.springframework.test.context.web.ServletTestExecutionListener.prepareTestInstance(ServletTestExecutionListener.java:131)[spring-test-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    4. org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:230)[spring-test-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    5. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:228)[spring-test-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    6. org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:287)[spring-test-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    6 frames
  8. JUnit
    ReflectiveCallable.run
    1. org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)[junit-4.12.jar:4.12]
    1 frame
  9. Spring TestContext
    SpringJUnit4ClassRunner.runChild
    1. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:289)[spring-test-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    2. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:247)[spring-test-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    3. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:94)[spring-test-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    3 frames
  10. JUnit
    ParentRunner$2.evaluate
    1. org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)[junit-4.12.jar:4.12]
    2. org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)[junit-4.12.jar:4.12]
    3. org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)[junit-4.12.jar:4.12]
    4. org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)[junit-4.12.jar:4.12]
    5. org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)[junit-4.12.jar:4.12]
    5 frames
  11. Spring TestContext
    RunAfterTestClassCallbacks.evaluate
    1. org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)[spring-test-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    2. org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)[spring-test-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    2 frames
  12. JUnit
    ParentRunner.run
    1. org.junit.runners.ParentRunner.run(ParentRunner.java:363)[junit-4.12.jar:4.12]
    1 frame
  13. Spring TestContext
    SpringJUnit4ClassRunner.run
    1. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:191)[spring-test-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    1 frame
  14. JUnit
    JUnitCore.run
    1. org.junit.runner.JUnitCore.run(JUnitCore.java:137)[junit-4.12.jar:4.12]
    2. org.junit.runner.JUnitCore.run(JUnitCore.java:115)[junit-4.12.jar:4.12]
    2 frames
  15. TestNG
    TestNG.run
    1. org.testng.junit.JUnit4TestRunner.start(JUnit4TestRunner.java:81)[testng-6.9.8.jar:?]
    2. org.testng.junit.JUnit4TestRunner.run(JUnit4TestRunner.java:69)[testng-6.9.8.jar:?]
    3. org.testng.TestRunner$1.run(TestRunner.java:689)[testng-6.9.8.jar:?]
    4. org.testng.TestRunner.runWorkers(TestRunner.java:1014)[testng-6.9.8.jar:?]
    5. org.testng.TestRunner.privateRunJUnit(TestRunner.java:720)[testng-6.9.8.jar:?]
    6. org.testng.TestRunner.run(TestRunner.java:621)[testng-6.9.8.jar:?]
    7. org.testng.SuiteRunner.runTest(SuiteRunner.java:359)[testng-6.9.8.jar:?]
    8. org.testng.SuiteRunner.runSequentially(SuiteRunner.java:354)[testng-6.9.8.jar:?]
    9. org.testng.SuiteRunner.privateRun(SuiteRunner.java:312)[testng-6.9.8.jar:?]
    10. org.testng.SuiteRunner.run(SuiteRunner.java:261)[testng-6.9.8.jar:?]
    11. org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)[testng-6.9.8.jar:?]
    12. org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)[testng-6.9.8.jar:?]
    13. org.testng.TestNG.runSuitesSequentially(TestNG.java:1191)[testng-6.9.8.jar:?]
    14. org.testng.TestNG.runSuitesLocally(TestNG.java:1116)[testng-6.9.8.jar:?]
    15. org.testng.TestNG.run(TestNG.java:1024)[testng-6.9.8.jar:?]
    15 frames
  16. org.apache.maven
    TestNGProvider.invoke
    1. org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:115)[surefire-testng-2.18.1.jar:2.18.1]
    2. org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.executeMulti(TestNGDirectoryTestSuite.java:212)[surefire-testng-2.18.1.jar:2.18.1]
    3. org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:108)[surefire-testng-2.18.1.jar:2.18.1]
    4. org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:111)[surefire-testng-2.18.1.jar:2.18.1]
    4 frames
  17. SureFire
    ForkedBooter.main
    1. org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)[surefire-booter-2.18.1.jar:2.18.1]
    2. org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)[surefire-booter-2.18.1.jar:2.18.1]
    3. org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)[surefire-booter-2.18.1.jar:2.18.1]
    3 frames