org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'loginView': Unsatisfied dependency expressed through field 'accountRepository'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.reborn.simtrade.backend.repositories.AccountRepository' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

Stack Overflow | Reborn | 4 months ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to rafael . Or join the community to write better ones.
  1. 0
    samebug tip
    You could be missing an annotation (@Service or @Component) or a definition in the xml. Also, look if the class where your implementation is located is properly scanned. (add this as source: https://goo.gl/PLJZGJ)
  2. 0
    samebug tip
    You could be missing na annotation (@Service or @Component) or the <bean> definition in the xml. Also, look if the class where your implementation is located is properly scanned (check "<context:component-scan base-package=")
    via goo.gl
  3. 0

    Spring Boot 1.4 - TestRestTemplate Unsatisfied dependency exception

    Stack Overflow | 8 months ago | WildDev
    org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'com.myproject.controllers.MyControllerTest': Unsatisfied dependency expressed through field 'restTemplate': No qualifying bean of type [org.springframework.boot.test.web.client.TestRestTemplate] found for dependency [org.springframework.boot.test.web.client.TestRestTemplate]: 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 [org.springframework.boot.test.web.client.TestRestTemplate] found for dependency [org.springframework.boot.test.web.client.TestRestTemplate]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Running JUnit test on Controller results in UnsatisfiedDependencyException

    Stack Overflow | 3 months ago | BustedSanta
    org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'com.pckg.controller.ServiceControllerUnitTest': Unsatisfied dependency expressed through field 'controller'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.pckg.controller.ServiceController' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
  6. 0

    Can't Autowire JpaRepository in Junit test - Spring boot application

    Stack Overflow | 6 months ago | Greg
    org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'todoController': Unsatisfied dependency expressed through field 'todoRepository': No qualifying bean of type [au.com.bla.bla.bla.repository.TodoRepository] found for dependency [au.com.bla.bla.bla.repository.TodoRepository]: 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 [au.com.bla.bla.bla.repository.TodoRepository] found for dependency [au.com.bla.bla.bla.repository.TodoRepository]: 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.UnsatisfiedDependencyException

    Error creating bean with name 'loginView': Unsatisfied dependency expressed through field 'accountRepository'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.reborn.simtrade.backend.repositories.AccountRepository' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject()
  2. Spring Beans
    AbstractBeanFactory$2.getObject
    1. org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:592)[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]
    2. org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]
    3. org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:370)[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]
    4. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1219)[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]
    5. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:551)[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]
    6. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]
    7. org.springframework.beans.factory.support.AbstractBeanFactory$2.getObject(AbstractBeanFactory.java:345)[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]
    7 frames
  3. com.vaadin.spring
    UIScopeImpl.get
    1. com.vaadin.spring.internal.BeanStore.create(BeanStore.java:71)[vaadin-spring-1.0.0.jar:1.0.0]
    2. com.vaadin.spring.internal.UIScopeImpl$UIBeanStore.create(UIScopeImpl.java:279)[vaadin-spring-1.0.0.jar:1.0.0]
    3. com.vaadin.spring.internal.BeanStore.get(BeanStore.java:62)[vaadin-spring-1.0.0.jar:1.0.0]
    4. com.vaadin.spring.internal.SessionLockingBeanStore.get(SessionLockingBeanStore.java:46)[vaadin-spring-1.0.0.jar:1.0.0]
    5. com.vaadin.spring.internal.UIScopeImpl.get(UIScopeImpl.java:81)[vaadin-spring-1.0.0.jar:1.0.0]
    5 frames
  4. Spring Beans
    AbstractBeanFactory.getBean
    1. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:340)[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]
    2. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]
    2 frames
  5. Spring Context
    AbstractApplicationContext.getBean
    1. org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1081)[spring-context-4.3.4.RELEASE.jar:4.3.4.RELEASE]
    1 frame
  6. com.vaadin.spring
    SpringViewProvider.getView
    1. com.vaadin.spring.navigator.SpringViewProvider.getViewFromApplicationContextAndCheckAccess(SpringViewProvider.java:312)[vaadin-spring-1.0.0.jar:1.0.0]
    2. com.vaadin.spring.navigator.SpringViewProvider.getViewFromApplicationContext(SpringViewProvider.java:301)[vaadin-spring-1.0.0.jar:1.0.0]
    3. com.vaadin.spring.navigator.SpringViewProvider.getView(SpringViewProvider.java:274)[vaadin-spring-1.0.0.jar:1.0.0]
    3 frames
  7. com.vaadin.navigator
    Navigator.navigateTo
    1. com.vaadin.navigator.Navigator.navigateTo(Navigator.java:554)[vaadin-server-7.7.6.jar:7.7.6]
    1 frame
  8. com.reborn.simtrade
    SplashScreen.redirect
    1. com.reborn.simtrade.ui.home.SplashScreen.redirect(SplashScreen.java:72)[classes/:na]
    1 frame
  9. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.8.0_111]
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[na:1.8.0_111]
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.8.0_111]
    4. java.lang.reflect.Method.invoke(Method.java:498)[na:1.8.0_111]
    4 frames
  10. Vaadin
    EventRouter.fireEvent
    1. com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:510)[vaadin-server-7.7.6.jar:7.7.6]
    2. com.vaadin.event.EventRouter.fireEvent(EventRouter.java:200)[vaadin-server-7.7.6.jar:7.7.6]
    3. com.vaadin.event.EventRouter.fireEvent(EventRouter.java:163)[vaadin-server-7.7.6.jar:7.7.6]
    3 frames
  11. com.vaadin.server
    AbstractClientConnector.fireEvent
    1. com.vaadin.server.AbstractClientConnector.fireEvent(AbstractClientConnector.java:1015)[vaadin-server-7.7.6.jar:7.7.6]
    1 frame
  12. Vaadin
    Button$1.click
    1. com.vaadin.ui.Button.fireClick(Button.java:377)[vaadin-server-7.7.6.jar:7.7.6]
    2. com.vaadin.ui.Button$1.click(Button.java:54)[vaadin-server-7.7.6.jar:7.7.6]
    2 frames
  13. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.8.0_111]
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[na:1.8.0_111]
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.8.0_111]
    4. java.lang.reflect.Method.invoke(Method.java:498)[na:1.8.0_111]
    4 frames
  14. com.vaadin.server
    UidlRequestHandler.synchronizedHandleRequest
    1. com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:158)[vaadin-server-7.7.6.jar:7.7.6]
    2. com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:119)[vaadin-server-7.7.6.jar:7.7.6]
    3. com.vaadin.server.communication.ServerRpcHandler.handleInvocation(ServerRpcHandler.java:435)[vaadin-server-7.7.6.jar:7.7.6]
    4. com.vaadin.server.communication.ServerRpcHandler.handleInvocations(ServerRpcHandler.java:407)[vaadin-server-7.7.6.jar:7.7.6]
    5. com.vaadin.server.communication.ServerRpcHandler.handleRpc(ServerRpcHandler.java:273)[vaadin-server-7.7.6.jar:7.7.6]
    6. com.vaadin.server.communication.UidlRequestHandler.synchronizedHandleRequest(UidlRequestHandler.java:90)[vaadin-server-7.7.6.jar:7.7.6]
    6 frames