org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'securityConfig': Unsatisfied dependency expressed through field 'userDetailsService': Error creating bean with name 'secUserDetailsService': Unsatisfied dependency expressed through field 'userRepository': No qualifying bean of type [com.myBlog.Services.UserRepository] found for dependency [com.myBlog.Services.UserRepository]: 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 [com.myBlog.Services.UserRepository] found for dependency [com.myBlog.Services.UserRepository]: 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.UnsatisfiedDependencyException: Error creating bean with name 'secUserDetailsService': Unsatisfied dependency expressed through field 'userRepository': No qualifying bean of type [com.myBlog.Services.UserRepository] found for dependency [com.myBlog.Services.UserRepository]: 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 [com.myBlog.Services.UserRepository] found for dependency [com.myBlog.Services.UserRepository]: 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 | Ahmed-F | 2 months ago
  1. 0

    Spring Security : mongodb authentication provider

    Stack Overflow | 2 months ago | Ahmed-F
    org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'securityConfig': Unsatisfied dependency expressed through field 'userDetailsService': Error creating bean with name 'secUserDetailsService': Unsatisfied dependency expressed through field 'userRepository': No qualifying bean of type [com.myBlog.Services.UserRepository] found for dependency [com.myBlog.Services.UserRepository]: 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 [com.myBlog.Services.UserRepository] found for dependency [com.myBlog.Services.UserRepository]: 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.UnsatisfiedDependencyException: Error creating bean with name 'secUserDetailsService': Unsatisfied dependency expressed through field 'userRepository': No qualifying bean of type [com.myBlog.Services.UserRepository] found for dependency [com.myBlog.Services.UserRepository]: 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 [com.myBlog.Services.UserRepository] found for dependency [com.myBlog.Services.UserRepository]: 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

    Unable to bring up swagger-ui from spring-boot application

    Stack Overflow | 1 year ago | Naveen Chandra
    org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'documentationPluginsBootstrapper' defined in URL [jar:file:/Users/ngorijala/.m2/repository/io/springfox/springfox-spring-web/2.2.2/springfox-spring-web-2.2.2.jar!/springfox/documentation/spring/web/plugins/DocumentationPluginsBootstrapper.class]: Unsatisfied dependency expressed through constructor argument with index 1 of type [springfox.documentation.spi.service.RequestHandlerProvider]: : Error creating bean with name 'webMvcRequestHandlerProvider' defined in URL [jar:file:/Users/ngorijala/.m2/repository/io/springfox/springfox-spring-web/2.2.2/springfox-spring-web-2.2.2.jar!/springfox/documentation/spring/web/plugins/WebMvcRequestHandlerProvider.class]: Unsatisfied dependency expressed through constructor argument with index 0 of type [java.util.List]: : No qualifying bean of type [org.springframework.web.servlet.mvc.method.RequestMappingInfoHandlerMapping] found for dependency [collection of 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 [org.springframework.web.servlet.mvc.method.RequestMappingInfoHandlerMapping] found for dependency [collection of 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:/Users/ngorijala/.m2/repository/io/springfox/springfox-spring-web/2.2.2/springfox-spring-web-2.2.2.jar!/springfox/documentation/spring/web/plugins/WebMvcRequestHandlerProvider.class]: Unsatisfied dependency expressed through constructor argument with index 0 of type [java.util.List]: : No qualifying bean of type [org.springframework.web.servlet.mvc.method.RequestMappingInfoHandlerMapping] found for dependency [collection of 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 [org.springframework.web.servlet.mvc.method.RequestMappingInfoHandlerMapping] found for dependency [collection of org.springframework.web.servlet.mvc.method.RequestMappingInfoHandlerMapping]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}
  3. 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: {}
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 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: {}
  6. 0

    Spring error when add prarameter to bean

    Stack Overflow | 3 years ago | Alireza Fattahi
    org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'getSourceAccountsList' defined in class path resource [net/iranet/isc/saba/services/AccountServices.class]: Unsatisfied dependency expressed through constructor argument with index 0 of type [java.lang.String]: : No qualifying bean of type [java.lang.String] 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 [java.lang.String] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}

  1. Andreas Häber 2 times, last 1 month ago
  2. serious2monkeys 20 times, last 1 month ago
  3. batwalrus76 6 times, last 5 days ago
  4. tvrmsmith 2 times, last 7 days ago
  5. mauritius 1 times, last 1 month ago
10 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.UnsatisfiedDependencyException

    Error creating bean with name 'securityConfig': Unsatisfied dependency expressed through field 'userDetailsService': Error creating bean with name 'secUserDetailsService': Unsatisfied dependency expressed through field 'userRepository': No qualifying bean of type [com.myBlog.Services.UserRepository] found for dependency [com.myBlog.Services.UserRepository]: 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 [com.myBlog.Services.UserRepository] found for dependency [com.myBlog.Services.UserRepository]: 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.UnsatisfiedDependencyException: Error creating bean with name 'secUserDetailsService': Unsatisfied dependency expressed through field 'userRepository': No qualifying bean of type [com.myBlog.Services.UserRepository] found for dependency [com.myBlog.Services.UserRepository]: 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 [com.myBlog.Services.UserRepository] found for dependency [com.myBlog.Services.UserRepository]: 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()
  2. Spring Beans
    DefaultListableBeanFactory.preInstantiateSingletons
    1. org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:569)
    2. org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
    3. org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:349)
    4. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1214)
    5. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543)
    6. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
    7. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
    8. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    9. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
    10. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
    11. org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:776)
    11 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. Jetty Server
    WebAppContext.doStart
    1. org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:549)
    2. org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
    3. org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1282)
    4. org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:518)
    5. org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:499)
    5 frames
  6. Jetty :: Jetty Maven Plugin
    Jetty6PluginWebAppContext.doStart
    1. org.mortbay.jetty.plugin.Jetty6PluginWebAppContext.doStart(Jetty6PluginWebAppContext.java:115)
    1 frame
  7. Jetty Util
    AbstractLifeCycle.start
    1. org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    1 frame
  8. Jetty Server
    ContextHandlerCollection.doStart
    1. org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
    2. org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
    2 frames
  9. Jetty Util
    AbstractLifeCycle.start
    1. org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    1 frame
  10. Jetty Server
    HandlerCollection.doStart
    1. org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
    1 frame
  11. Jetty Util
    AbstractLifeCycle.start
    1. org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    1 frame
  12. Jetty Server
    Server.doStart
    1. org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
    2. org.mortbay.jetty.Server.doStart(Server.java:224)
    2 frames
  13. Jetty Util
    AbstractLifeCycle.start
    1. org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    1 frame
  14. Jetty :: Jetty Maven Plugin
    Jetty6RunMojo.execute
    1. org.mortbay.jetty.plugin.Jetty6PluginServer.start(Jetty6PluginServer.java:132)
    2. org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:454)
    3. org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:396)
    4. org.mortbay.jetty.plugin.AbstractJettyRunMojo.execute(AbstractJettyRunMojo.java:210)
    5. org.mortbay.jetty.plugin.Jetty6RunMojo.execute(Jetty6RunMojo.java:184)
    5 frames
  15. Maven Plugin
    DefaultBuildPluginManager.executeMojo
    1. org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
    1 frame
  16. Maven Core
    DefaultMaven.execute
    1. org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
    2. org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    3. org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    4. org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
    5. org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
    6. org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
    7. org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
    8. org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
    9. org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
    9 frames
  17. M3 Interceptor
    MavenCli.main
    1. org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
    2. org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
    3. org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
    3 frames
  18. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:498)
    4 frames
  19. Plexus
    Launcher.main
    1. org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
    2. org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
    3. org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
    4. org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
    5. org.codehaus.classworlds.Launcher.main(Launcher.java:47)
    5 frames