org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'commandLineRunner': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.cloud.task.sparkapp.common.SparkAppCommonTaskProperties org.springframework.cloud.task.app.spark.yarn.SparkYarnTaskConfiguration$SparkAppYarnRunner.commonConfig; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [org.springframework.cloud.task.sparkapp.common.SparkAppCommonTaskProperties] 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)}

GitHub | trisberg | 4 months ago
  1. 0

    Regression in 1.0.0 GA: spark-yarn task fails to start

    GitHub | 4 months ago | trisberg
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'commandLineRunner': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.cloud.task.sparkapp.common.SparkAppCommonTaskProperties org.springframework.cloud.task.app.spark.yarn.SparkYarnTaskConfiguration$SparkAppYarnRunner.commonConfig; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [org.springframework.cloud.task.sparkapp.common.SparkAppCommonTaskProperties] 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

    I am running a simple Spring Data Elastic Search example but is throwing this Exception

    Stack Overflow | 8 months ago | Riddhik_debugger
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'elasticMain': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: public com.elasticsearch.europe.service.MovieService com.elasticsearch.europe.main.ElasticMain.movieService; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.elasticsearch.europe.service.MovieService] 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)}
  3. 0

    GitHub comment 72#217645700

    GitHub | 7 months ago | kaixinwangzi1982
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'areaDao': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: protected org.apache.ibatis.session.SqlSession sample.mybatis.BaseDao.writableSQLSession; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [org.apache.ibatis.session.SqlSession] 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), @org.springframework.beans.factory.annotation.Qualifier(value=writableSQLSession)}
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Spring boot with spring data repository - cannot autowire own repository

    Stack Overflow | 5 months ago | user1604064
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'HQLTester': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: com.service.CompanyRepository com.example.HQLTester.companyRepository; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.service.CompanyRepository] 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)}
  6. 0

    Error creating bean with name

    Stack Overflow | 5 months ago | Jeffrey
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'springbootjpaApplication': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: public com.repository.CustomerRepository com.example.SpringbootjpaApplication.customerRepository; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.repository.CustomerRepository] 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. rlovtangen 2 times, last 2 weeks ago
  2. tvrmsmith 6 times, last 2 weeks ago
  3. kjhdofjosvs 1 times, last 3 weeks ago
  4. Luka 14 times, last 2 months ago
  5. Gregooz 1 times, last 8 months 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.cloud.task.sparkapp.common.SparkAppCommonTaskProperties] 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
    SpringApplication.run
    1. org.springframework.boot.SpringApplication.refresh(SpringApplication.java:766)[spring-boot-1.3.5.RELEASE.jar!/:1.3.5.RELEASE]
    2. org.springframework.boot.SpringApplication.createAndRefreshContext(SpringApplication.java:361)[spring-boot-1.3.5.RELEASE.jar!/:1.3.5.RELEASE]
    3. org.springframework.boot.SpringApplication.run(SpringApplication.java:307)[spring-boot-1.3.5.RELEASE.jar!/:1.3.5.RELEASE]
    4. org.springframework.boot.SpringApplication.run(SpringApplication.java:1191)[spring-boot-1.3.5.RELEASE.jar!/:1.3.5.RELEASE]
    5. org.springframework.boot.SpringApplication.run(SpringApplication.java:1180)[spring-boot-1.3.5.RELEASE.jar!/:1.3.5.RELEASE]
    5 frames
  5. org.springframework.cloud
    SparkYarnTaskApplication.main
    1. org.springframework.cloud.task.app.spark.yarn.SparkYarnTaskApplication.main(SparkYarnTaskApplication.java:29)[spark-yarn-task-1.0.0.RELEASE.jar!/:1.0.0.RELEASE]
    1 frame
  6. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.8.0_40]
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[na:1.8.0_40]
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.8.0_40]
    4. java.lang.reflect.Method.invoke(Method.java:497)[na:1.8.0_40]
    4 frames
  7. Spring Boot Loader
    MainMethodRunner.run
    1. org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:54)[spark-yarn-task-1.0.0.RELEASE.jar!/:1.0.0.RELEASE]
    1 frame
  8. Java RT
    Thread.run
    1. java.lang.Thread.run(Thread.java:745)[na:1.8.0_40]
    1 frame