org.springframework.beans.factory.UnsatisfiedDependencyException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Error creating bean - Spring Boot
    via Stack Overflow by cybertextron
    ,
  • Jetty无法启动
    via GitHub by slowlizard
    ,
  • GitHub comment 4009#241235629
    via GitHub by tsaqova
    ,
  • GitHub comment 4009#241219770
    via GitHub by tsaqova
    ,
  • Testing Java service layer with spring-boot 1.4
    via Stack Overflow by eszik.k
    ,
    • org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'buildsController': Unsatisfied dependency expressed through field 'buildsRepository': 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: {@org.springframework.beans.factory.annotation.Autowired(required=true)}; 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: {@org.springframework.beans.factory.annotation.Autowired(required=true)} at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:569)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:349)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1214)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:776)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:861)[spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:541)[spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:369)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:313)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE] at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:111)[spring-boot-test-1.4.0.RELEASE.jar:1.4.0.RELEASE] at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:98)[spring-test-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:116)[spring-test-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:83)[spring-test-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.test.context.web.ServletTestExecutionListener.setUpRequestContextIfNecessary(ServletTestExecutionListener.java:189)[spring-test-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.test.context.web.ServletTestExecutionListener.prepareTestInstance(ServletTestExecutionListener.java:131)[spring-test-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:230)[spring-test-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:228)[spring-test-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:287)[spring-test-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)[junit-4.12.jar:4.12] at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:289)[spring-test-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:247)[spring-test-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:94)[spring-test-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)[junit-4.12.jar:4.12] at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)[junit-4.12.jar:4.12] at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)[junit-4.12.jar:4.12] at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)[junit-4.12.jar:4.12] at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)[junit-4.12.jar:4.12] at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)[spring-test-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)[spring-test-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.junit.runners.ParentRunner.run(ParentRunner.java:363)[junit-4.12.jar:4.12] at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:191)[spring-test-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.junit.runner.JUnitCore.run(JUnitCore.java:137)[junit-4.12.jar:4.12] at org.junit.runner.JUnitCore.run(JUnitCore.java:115)[junit-4.12.jar:4.12] at org.testng.junit.JUnit4TestRunner.start(JUnit4TestRunner.java:81)[testng-6.9.8.jar:?] at org.testng.junit.JUnit4TestRunner.run(JUnit4TestRunner.java:69)[testng-6.9.8.jar:?] at org.testng.TestRunner$1.run(TestRunner.java:689)[testng-6.9.8.jar:?] at org.testng.TestRunner.runWorkers(TestRunner.java:1014)[testng-6.9.8.jar:?] at org.testng.TestRunner.privateRunJUnit(TestRunner.java:720)[testng-6.9.8.jar:?] at org.testng.TestRunner.run(TestRunner.java:621)[testng-6.9.8.jar:?] at org.testng.SuiteRunner.runTest(SuiteRunner.java:359)[testng-6.9.8.jar:?] at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:354)[testng-6.9.8.jar:?] at org.testng.SuiteRunner.privateRun(SuiteRunner.java:312)[testng-6.9.8.jar:?] at org.testng.SuiteRunner.run(SuiteRunner.java:261)[testng-6.9.8.jar:?] at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)[testng-6.9.8.jar:?] at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)[testng-6.9.8.jar:?] at org.testng.TestNG.runSuitesSequentially(TestNG.java:1191)[testng-6.9.8.jar:?] at org.testng.TestNG.runSuitesLocally(TestNG.java:1116)[testng-6.9.8.jar:?] at org.testng.TestNG.run(TestNG.java:1024)[testng-6.9.8.jar:?] at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:115)[surefire-testng-2.18.1.jar:2.18.1] at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.executeMulti(TestNGDirectoryTestSuite.java:212)[surefire-testng-2.18.1.jar:2.18.1] at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:108)[surefire-testng-2.18.1.jar:2.18.1] at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:111)[surefire-testng-2.18.1.jar:2.18.1] at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)[surefire-booter-2.18.1.jar:2.18.1] at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)[surefire-booter-2.18.1.jar:2.18.1] at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)[surefire-booter-2.18.1.jar:2.18.1] Caused by: 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: {@org.springframework.beans.factory.annotation.Autowired(required=true)} at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoMatchingBeanFound(DefaultListableBeanFactory.java:1406)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1057)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1019)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:566)

    Users with the same issue

    musketyr
    1 times, last one,
    Adarro
    1 times, last one,
    nasimk
    1 times, last one,
    Nikolay Rybak
    1 times, last one,
    MrMonkey
    1 times, last one,
    30 more bugmates