Skip to content

Commit 37f4f43

Browse files
committed
Consistent 4.x style NoClassDefFoundError handling
Issue: SPR-14883
1 parent db1a84e commit 37f4f43

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

spring-beans/src/main/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,10 @@ public void doWith(Method method) throws IllegalArgumentException, IllegalAccess
265265
catch (IllegalStateException ex) {
266266
throw new BeanCreationException(beanName, "Lookup method resolution failed", ex);
267267
}
268+
catch (NoClassDefFoundError err) {
269+
throw new BeanCreationException(beanName, "Failed to introspect bean class [" + beanClass.getName() +
270+
"] for lookup method metadata: could not find class that it depends on", err);
271+
}
268272
this.lookupMethodsChecked.add(beanName);
269273
}
270274

0 commit comments

Comments
 (0)