spring-projects/spring-framework · error · IllegalArgumentException
AutowiredAnnotationBeanPostProcessor requires a Configurable
Error message
AutowiredAnnotationBeanPostProcessor requires a ConfigurableListableBeanFactory: ${beanFactory} What it means
Error "AutowiredAnnotationBeanPostProcessor requires a ConfigurableListableBeanFactory: ${beanFactory}" thrown in spring-projects/spring-framework.
Source
Thrown at spring-beans/src/main/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.java:270
* @see #setRequiredParameterName(String)
*/
public void setRequiredParameterValue(boolean requiredParameterValue) {
this.requiredParameterValue = requiredParameterValue;
}
public void setOrder(int order) {
this.order = order;
}
@Override
public int getOrder() {
return this.order;
}
@Override
public void setBeanFactory(BeanFactory beanFactory) {
if (!(beanFactory instanceof ConfigurableListableBeanFactory clbf)) {
throw new IllegalArgumentException(
"AutowiredAnnotationBeanPostProcessor requires a ConfigurableListableBeanFactory: " + beanFactory);
}
this.beanFactory = clbf;
this.metadataReaderFactory = MetadataReaderFactory.create(clbf.getBeanClassLoader());
}
@Override
public void postProcessMergedBeanDefinition(RootBeanDefinition beanDefinition, Class<?> beanType, String beanName) {
// Register externally managed config members on bean definition.
findInjectionMetadata(beanName, beanType, beanDefinition);
// Use opportunity to clear caches which are not needed after singleton instantiation.
// The injectionMetadataCache itself is left intact since it cannot be reliably
// reconstructed in terms of externally managed config members otherwise.
if (beanDefinition.isSingleton()) {
this.candidateConstructorsCache.remove(beanType);
// With actual lookup overrides, keep it intact along with bean definition.View on GitHub (pinned to e8729d0438)
When it happens
Trigger: Thrown at spring-beans/src/main/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.java:270 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of spring-projects/spring-framework@e8729d0438 (2026-08-04).
Data as JSON: /data/errors/b84b61d5bd3828a6.json.
Report an issue: GitHub.