org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'menuController': Unsatisfied dependency expressed through field 'mongoTemplate': No qualifying bean of type [org.springframework.data.mongodb.core.MongoTemplate] found for dependency [org.springframework.data.mongodb.core.MongoTemplate]: 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.data.mongodb.core.MongoTemplate] found for dependency [org.springframework.data.mongodb.core.MongoTemplate]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

Stack Overflow | sirajnadwar | 2 months ago
  1. 0

    Autowire the beans to my controller. Prevent use of getBean method

    Stack Overflow | 2 months ago | sirajnadwar
    org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'menuController': Unsatisfied dependency expressed through field 'mongoTemplate': No qualifying bean of type [org.springframework.data.mongodb.core.MongoTemplate] found for dependency [org.springframework.data.mongodb.core.MongoTemplate]: 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.data.mongodb.core.MongoTemplate] found for dependency [org.springframework.data.mongodb.core.MongoTemplate]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
  2. 0

    Sample App Fails: No qualifying bean of type RedisTemplate

    GitHub | 2 years ago | frankbeerstein
    org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sessionRepository' defined in class Config: Unsatisfied dependency expressed through constructor argument with index 0 of type [org.springframework.data.redis.core.RedisTemplate]: : No qualifying bean of type [org.springframework.data.redis.core.RedisTemplate] found for dependency: 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 [org.springframework.data.redis.core.RedisTemplate] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}
  3. 0

    Spring MVC test passing when application is failing

    Stack Overflow | 2 years ago | Kyle Walker
    org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'clinicalNoteController' defined in file [C:\Users\kyle\workspace.metadata.plugins\org.eclipse.wst.server.core\tmp2\wtpwebapps\Practice Wellness\WEB-INF\classes\com\kwalker\practicewellness\web\ClinicalNoteController.class]: Unsatisfied dependency expressed through constructor argument with index 0 of type [com.kwalker.practicewellness.data.ClinicalNoteRepository]: : No qualifying bean of type [com.kwalker.practicewellness.data.ClinicalNoteRepository] found for dependency: 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.kwalker.practicewellness.data.ClinicalNoteRepository] found for dependency: 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

    Error configuring Spring data and neo4j embedded

    Stack Overflow | 3 years ago | Vinicius Souza
    org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'graphDatabaseService' defined in ServletContext resource [/WEB-INF/mvc-dispatcher-servlet.xml]: Unsatisfied dependency expressed through constructor argument with index 2 of type [java.lang.Iterable]: Ambiguous constructor argument types - did you specify the correct bean references as constructor arguments?
  6. 0

    Missing dependency MessageSendingOperations for Spring based WebSocket configuration

    Stack Overflow | 2 years ago | Patrick
    org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'greetingController' defined in file [/Users/Patrick/Workspaces/WebSocketDemo/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/vms-atp-webapp/WEB-INF/classes/com/company/demo/controller/GreetingController.class]: Unsatisfied dependency expressed through constructor argument with index 0 of type [org.springframework.messaging.core.MessageSendingOperations]: : No qualifying bean of type [org.springframework.messaging.core.MessageSendingOperations] found for dependency: 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 [org.springframework.messaging.core.MessageSendingOperations] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}

  1. serious2monkeys 20 times, last 1 month ago
  2. Andreas Häber 2 times, last 3 weeks ago
  3. tvrmsmith 6 times, last 1 week ago
  4. mauritius 1 times, last 1 month ago
  5. andyglick 12 times, last 2 months ago
9 more registered users
56 unregistered visitors
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 [org.springframework.data.mongodb.core.MongoTemplate] found for dependency [org.springframework.data.mongodb.core.MongoTemplate]: 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()
  2. Spring Beans
    DefaultListableBeanFactory.preInstantiateSingletons
    1. org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoMatchingBeanFound(DefaultListableBeanFactory.java:1406)
    2. org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1057)
    3. org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1019)
    4. org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:566)
    5. org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
    6. org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:349)
    7. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1214)
    8. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543)
    9. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
    10. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
    11. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    12. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
    13. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
    14. org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:776)
    14 frames
  3. Spring Context
    AbstractApplicationContext.refresh
    1. org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:861)
    2. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:541)
    2 frames
  4. Spring
    ContextLoaderListener.contextInitialized
    1. org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:444)
    2. org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:326)
    3. org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
    3 frames
  5. Glassfish Core
    ContainerBase$StartChild.call
    1. org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4715)
    2. org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5177)
    3. org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:152)
    4. org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1403)
    5. org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1393)
    5 frames
  6. Java RT
    Thread.run
    1. java.util.concurrent.FutureTask.run(Unknown Source)
    2. java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    3. java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    4. java.lang.Thread.run(Unknown Source)
    4 frames