{"id":"ad0544e062bbc0c5","repo":"spring-projects/spring-framework","slug":"no-matching-beantype-getsimplename-bean-found","errorCode":null,"errorMessage":"No matching ${beanType.getSimpleName()} bean found for bean name '${qualifier}'! (Note: Qualifier matching not supported because given BeanFactory does not implement ConfigurableListableBeanFactory.)","messagePattern":"No matching (.+?) bean found for bean name '(.+?)'! \\(Note: Qualifier matching not supported because given BeanFactory does not implement ConfigurableListableBeanFactory\\.\\)","errorType":"exception","errorClass":"NoSuchBeanDefinitionException","httpStatus":null,"severity":"error","filePath":"spring-beans/src/main/java/org/springframework/beans/factory/annotation/BeanFactoryAnnotationUtils.java","lineNumber":104,"sourceCode":"\t * @throws NoSuchBeanDefinitionException if no matching bean of type {@code T} found\n\t * @throws BeansException if the bean could not be created\n\t * @see BeanFactoryUtils#beanOfTypeIncludingAncestors(ListableBeanFactory, Class)\n\t */\n\tpublic static <T> T qualifiedBeanOfType(BeanFactory beanFactory, Class<T> beanType, String qualifier)\n\t\t\tthrows BeansException {\n\n\t\tAssert.notNull(beanFactory, \"BeanFactory must not be null\");\n\n\t\tif (beanFactory instanceof ListableBeanFactory lbf) {\n\t\t\t// Full qualifier matching supported.\n\t\t\treturn qualifiedBeanOfType(lbf, beanType, qualifier);\n\t\t}\n\t\telse if (beanFactory.containsBean(qualifier) && beanFactory.isTypeMatch(qualifier, beanType)) {\n\t\t\t// Fallback: target bean at least found by bean name.\n\t\t\treturn beanFactory.getBean(qualifier, beanType);\n\t\t}\n\t\telse {\n\t\t\tthrow new NoSuchBeanDefinitionException(qualifier, \"No matching \" + beanType.getSimpleName() +\n\t\t\t\t\t\" bean found for bean name '\" + qualifier +\n\t\t\t\t\t\"'! (Note: Qualifier matching not supported because given \" +\n\t\t\t\t\t\"BeanFactory does not implement ConfigurableListableBeanFactory.)\");\n\t\t}\n\t}\n\n\t/**\n\t * Obtain a bean of type {@code T} from the given {@code BeanFactory} declaring a qualifier\n\t * (for example, {@code <qualifier>} or {@code @Qualifier}) matching the given qualifier).\n\t * @param beanFactory the factory to get the target bean from\n\t * @param beanType the type of bean to retrieve\n\t * @param qualifier the qualifier for selecting between multiple bean matches\n\t * @return the matching bean of type {@code T} (never {@code null})\n\t */\n\tprivate static <T> T qualifiedBeanOfType(ListableBeanFactory beanFactory, Class<T> beanType, String qualifier) {\n\t\tString[] candidateBeans = BeanFactoryUtils.beanNamesForTypeIncludingAncestors(beanFactory, beanType);\n\t\tString matchingBean = null;\n\t\tfor (String beanName : candidateBeans) {","sourceCodeStart":86,"sourceCodeEnd":122,"githubUrl":"https://github.com/spring-projects/spring-framework/blob/e8729d043887bf0d0baf91e062e909b56eb2b708/spring-beans/src/main/java/org/springframework/beans/factory/annotation/BeanFactoryAnnotationUtils.java#L86-L122","documentation":"Error \"No matching ${beanType.getSimpleName()} bean found for bean name '${qualifier}'! (Note: Qualifier matching not supported because given BeanFactory does not implement ConfigurableListableBeanFactory.)\" thrown in spring-projects/spring-framework.","triggerScenarios":"Thrown at spring-beans/src/main/java/org/springframework/beans/factory/annotation/BeanFactoryAnnotationUtils.java:104 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"e8729d043887bf0d0baf91e062e909b56eb2b708","analyzedAt":"2026-08-04T19:07:39.725Z","schemaVersion":2}