org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'testController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.jdbc.core.JdbcTemplate com.test.controller.testController.template; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [org.springframework.jdbc.core.JdbcTemplate] found for dependency: 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 | Tanishq dubey | 4 months ago
  1. 0

    Could not Autowire - JdbcTemplate in Jetty Spring Boot

    Stack Overflow | 4 months ago | Tanishq dubey
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'testController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.jdbc.core.JdbcTemplate com.test.controller.testController.template; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [org.springframework.jdbc.core.JdbcTemplate] found for dependency: 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

    Spring Boot app work as standalone but not when Deploy in tomcat 7.X it doesn't work

    Stack Overflow | 2 years ago | Ravi
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'appServiceImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.eswaraj.domain.repo.CategoryRepository com.eswaraj.core.service.impl.AppServiceImpl.categoryRepository; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'categoryRepository': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSourceInitializer': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private javax.sql.DataSource org.springframework.boot.autoconfigure.jdbc.DataSourceInitializer.dataSource; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceAutoConfiguration$NonEmbeddedConfiguration.class]: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public javax.sql.DataSource org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration$NonEmbeddedConfiguration.dataSource()] threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Cannot determine embedded database driver class for database type NONE. If you want an embedded database please put a supported one on the classpath.
  3. 0

    Autowired in Spring MVC getting error : Error creating bean with name 'userService': Injection of autowired dependencies

    Stack Overflow | 1 year ago | Sreejith
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.sesame.repository.UserRepository com.sesame.service.UserService.userRepository; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.sesame.repository.UserRepository] found for dependency: 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

    Start Spring Boot War in a tomcat instance

    Stack Overflow | 12 months ago | Obscur Moirage
    org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/schdtool-war-1.0-SNAPSHOT]]
  6. 0

    Error creating bean with name 'endpoint' in spring 4

    Stack Overflow | 11 months ago | Praveen D
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'endpoint' defined in com.pd.config.PDConfig: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.xml.ws.Endpoint]: Factory method 'endpoint' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: com.pd.webService.response.model.ResponseModel com.pd.webService.Impl.ServiceInterfaceImpl.responseModel; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.pd.webService.response.model.ResponseModel] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

  1. dafman 2 times, last 3 months ago
  2. rlovtangen 1 times, last 1 week ago
  3. tvrmsmith 6 times, last 2 weeks ago
  4. kjhdofjosvs 1 times, last 4 weeks ago
  5. Andreas Häber 2 times, last 1 month ago
21 more registered users
74 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.jdbc.core.JdbcTemplate] found for dependency: 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.raiseNoSuchBeanDefinitionException()
  2. Spring Beans
    DefaultListableBeanFactory.preInstantiateSingletons
    1. org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoSuchBeanDefinitionException(DefaultListableBeanFactory.java:1373)[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE]
    2. org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1119)[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE]
    3. org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1014)[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE]
    4. org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:545)[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE]
    5. org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE]
    6. org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331)[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE]
    7. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1214)[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE]
    8. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543)[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE]
    9. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE]
    10. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE]
    11. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE]
    12. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE]
    13. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE]
    14. org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772)[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE]
    14 frames
  3. Spring Context
    AbstractApplicationContext.refresh
    1. org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839)[spring-context-4.2.6.RELEASE.jar:4.2.6.RELEASE]
    2. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538)[spring-context-4.2.6.RELEASE.jar:4.2.6.RELEASE]
    2 frames
  4. Spring Boot
    SpringBootServletInitializer.onStartup
    1. org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118)[spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE]
    2. org.springframework.boot.SpringApplication.refresh(SpringApplication.java:766)[spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE]
    3. org.springframework.boot.SpringApplication.createAndRefreshContext(SpringApplication.java:361)[spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE]
    4. org.springframework.boot.SpringApplication.run(SpringApplication.java:307)[spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE]
    5. org.springframework.boot.context.web.SpringBootServletInitializer.run(SpringBootServletInitializer.java:149)[spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE]
    6. org.springframework.boot.context.web.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:129)[spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE]
    7. org.springframework.boot.context.web.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:85)[spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE]
    7 frames
  5. Spring
    SpringServletContainerInitializer.onStartup
    1. org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:169)[spring-web-4.2.6.RELEASE.jar:4.2.6.RELEASE]
    1 frame
  6. Jetty
    Scanner$1.run
    1. org.eclipse.jetty.plus.annotation.ContainerInitializer.callStartup(ContainerInitializer.java:140)[jetty-plus-9.3.9.v20160517.jar:9.3.9.v20160517]
    2. org.eclipse.jetty.annotations.ServletContainerInitializersStarter.doStart(ServletContainerInitializersStarter.java:63)[jetty-annotations-9.3.9.v20160517.jar:9.3.9.v20160517]
    3. org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)[jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]
    4. org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:330)[jetty-servlet-9.3.9.v20160517.jar:9.3.9.v20160517]
    5. org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1404)[jetty-webapp-9.3.9.v20160517.jar:9.3.9.v20160517]
    6. org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1366)[jetty-webapp-9.3.9.v20160517.jar:9.3.9.v20160517]
    7. org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:772)[jetty-server-9.3.9.v20160517.jar:9.3.9.v20160517]
    8. org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:262)[jetty-servlet-9.3.9.v20160517.jar:9.3.9.v20160517]
    9. org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:520)[jetty-webapp-9.3.9.v20160517.jar:9.3.9.v20160517]
    10. org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)[jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]
    11. org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:41)[jetty-deploy-9.3.9.v20160517.jar:9.3.9.v20160517]
    12. org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:188)[jetty-deploy-9.3.9.v20160517.jar:9.3.9.v20160517]
    13. org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:499)[jetty-deploy-9.3.9.v20160517.jar:9.3.9.v20160517]
    14. org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:147)[jetty-deploy-9.3.9.v20160517.jar:9.3.9.v20160517]
    15. org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileChanged(ScanningAppProvider.java:198)[jetty-deploy-9.3.9.v20160517.jar:9.3.9.v20160517]
    16. org.eclipse.jetty.deploy.providers.WebAppProvider.fileChanged(WebAppProvider.java:409)[jetty-deploy-9.3.9.v20160517.jar:9.3.9.v20160517]
    17. org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileChanged(ScanningAppProvider.java:70)[jetty-deploy-9.3.9.v20160517.jar:9.3.9.v20160517]
    18. org.eclipse.jetty.util.Scanner.reportChange(Scanner.java:664)[jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]
    19. org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:532)[jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]
    20. org.eclipse.jetty.util.Scanner.scan(Scanner.java:392)[jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]
    21. org.eclipse.jetty.util.Scanner$1.run(Scanner.java:329)[jetty-util-9.3.9.v20160517.jar:9.3.9.v20160517]
    21 frames
  7. Java RT
    TimerThread.run
    1. java.util.TimerThread.mainLoop(Timer.java:555)[na:1.8.0_92]
    2. java.util.TimerThread.run(Timer.java:505)[na:1.8.0_92]
    2 frames