Skip to content

Lot of undesired WARN logs after migration from Spring 3 to Spring 4 [SPR-13833] #18406

@spring-projects-issues

Description

@spring-projects-issues

Armand Beuvens opened SPR-13833 and commented

After migration from Spring 3 to Spring 4, a lot of undesired WARN logs appear when our applications start similar to this one:

2015-12-30 18:30:18 [main] [ WARN] org.springframework.beans.factory.support.DefaultListableBeanFactory:1480 -> Bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ...

The beans for which these messages appear are lazy beans and it is normal that they cannot be created (we use them only in some environments).

After looking into the code, the problem comes from the method getTypeForFactoryBean of the class AbstractBeanFactory. In Spring 3, the fact that it was not possible to create a bean was logged at DEBUG level. In Spring 4.2.3, it is at WARN level. This change was made in the scope of #17005.
Could it be possible to put back DEBUG level for at least the lazy beans?

Thank you


Affects: 4.2.3

Issue Links:

Referenced from: commits 04f3181, 84e5234

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions