org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'homeController' defined in file [/Users/hobincar/Downloads/sts-bundle/pivotal-tc-server-developer-3.2.2.RELEASE/base-instance/wtpwebapps/qbank/WEB-INF/classes/ray/hobin/qbank/HomeController.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.springframework.social.facebook.api.Facebook' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}

Stack Overflow | ray | 3 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
    If you want to keep using @EnableWebMvc annotation, you have to add the code on the first answer of this page: https://goo.gl/JoHTKU to your code
  2. 0
    samebug tip
    Springboot auto-configuration is disabled when you try to use WebMvcConfigurerAdapter and @EnableWebMvc. If WebConfig is not of the essence, remove it and use SpringBoot auto-configuration.
  3. 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)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    spring4.3.4与fastjson1.2.22不兼容

    GitHub | 2 months ago | shuaijunlan
    org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'fastJsonpResponseBodyAdvice' defined in URL [jar:file:/E:/1-WPro/PerBlog/target/1-WPro/WEB-INF/lib/fastjson-1.2.22.jar!/com/alibaba/fastjson/support/spring/FastJsonpResponseBodyAdvice.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'java.lang.String[]' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
  6. 0

    org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'reloadablePropertyPostProcessor'

    Stack Overflow | 2 years ago | Renish
    org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'reloadablePropertyPostProcessor' defined in file** [/Users/xxxxx/Documents/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/spring3-mvc-maven-xml-hello-world/WEB-INF/classes/com/demo/design/properties/internal/ReloadablePropertyPostProcessor.class]: **Unsatisfied dependency expressed through constructor argument with index 0 of type** [com.demo.design.properties.internal.ReadablePropertySourcesPlaceholderConfigurer]: : No qualifying bean of type [com.demo.design.properties.internal.ReadablePropertySourcesPlaceholderConfigurer] 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.demo.design.properties.internal.ReadablePropertySourcesPlaceholderConfigurer] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}
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.social.facebook.api.Facebook' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}

    at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoMatchingBeanFound()
  2. Spring Beans
    DefaultListableBeanFactory.preInstantiateSingletons
    1. org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoMatchingBeanFound(DefaultListableBeanFactory.java:1474)
    2. org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1102)
    3. org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1064)
    4. org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:835)
    5. org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:741)
    6. org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:189)
    7. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1154)
    8. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1056)
    9. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)
    10. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
    11. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
    12. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    13. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
    14. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
    15. org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:759)
    15 frames
  3. Spring Context
    AbstractApplicationContext.refresh
    1. org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866)
    2. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)
    2 frames
  4. Spring MVC
    HttpServletBean.init
    1. org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:668)
    2. org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:634)
    3. org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:682)
    4. org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:553)
    5. org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:494)
    6. org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136)
    6 frames
  5. JavaServlet
    GenericServlet.init
    1. javax.servlet.GenericServlet.init(GenericServlet.java:158)
    1 frame
  6. Glassfish Core
    HostConfig$DeployDescriptor.run
    1. org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1183)
    2. org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1099)
    3. org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:989)
    4. org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4913)
    5. org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5223)
    6. org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    7. org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:724)
    8. org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:700)
    9. org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
    10. org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:596)
    11. org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1805)
    11 frames
  7. Java RT
    Thread.run
    1. java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    2. java.util.concurrent.FutureTask.run(FutureTask.java:266)
    3. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    4. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    5. java.lang.Thread.run(Thread.java:745)
    5 frames