{"id":"b84b61d5bd3828a6","repo":"spring-projects/spring-framework","slug":"autowiredannotationbeanpostprocessor-requires-a-co","errorCode":null,"errorMessage":"AutowiredAnnotationBeanPostProcessor requires a ConfigurableListableBeanFactory: ${beanFactory}","messagePattern":"AutowiredAnnotationBeanPostProcessor requires a ConfigurableListableBeanFactory: (.+?)","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"spring-beans/src/main/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.java","lineNumber":270,"sourceCode":"\t * @see #setRequiredParameterName(String)\n\t */\n\tpublic void setRequiredParameterValue(boolean requiredParameterValue) {\n\t\tthis.requiredParameterValue = requiredParameterValue;\n\t}\n\n\tpublic void setOrder(int order) {\n\t\tthis.order = order;\n\t}\n\n\t@Override\n\tpublic int getOrder() {\n\t\treturn this.order;\n\t}\n\n\t@Override\n\tpublic void setBeanFactory(BeanFactory beanFactory) {\n\t\tif (!(beanFactory instanceof ConfigurableListableBeanFactory clbf)) {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"AutowiredAnnotationBeanPostProcessor requires a ConfigurableListableBeanFactory: \" + beanFactory);\n\t\t}\n\t\tthis.beanFactory = clbf;\n\t\tthis.metadataReaderFactory = MetadataReaderFactory.create(clbf.getBeanClassLoader());\n\t}\n\n\n\t@Override\n\tpublic void postProcessMergedBeanDefinition(RootBeanDefinition beanDefinition, Class<?> beanType, String beanName) {\n\t\t// Register externally managed config members on bean definition.\n\t\tfindInjectionMetadata(beanName, beanType, beanDefinition);\n\n\t\t// Use opportunity to clear caches which are not needed after singleton instantiation.\n\t\t// The injectionMetadataCache itself is left intact since it cannot be reliably\n\t\t// reconstructed in terms of externally managed config members otherwise.\n\t\tif (beanDefinition.isSingleton()) {\n\t\t\tthis.candidateConstructorsCache.remove(beanType);\n\t\t\t// With actual lookup overrides, keep it intact along with bean definition.","sourceCodeStart":252,"sourceCodeEnd":288,"githubUrl":"https://github.com/spring-projects/spring-framework/blob/e8729d043887bf0d0baf91e062e909b56eb2b708/spring-beans/src/main/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.java#L252-L288","documentation":"Error \"AutowiredAnnotationBeanPostProcessor requires a ConfigurableListableBeanFactory: ${beanFactory}\" thrown in spring-projects/spring-framework.","triggerScenarios":"Thrown at spring-beans/src/main/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.java:270 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}