You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Under some conditions, spring context is wrongly created.
Problem appears when:
there are beans/code which requires eager creation of the beans (autowiring by type or getBeansByType());
there are instances of FactoryBean-s;
some of the beans during eager creation cannot be instanciated;
aliases are used;
The original problem happened with cxf library and thousands of objects in spring context. Out of that, hopefully, I was able to build the testcase. It is attached - as separate project (maven).
As it is, it fails with NullPointerException - this means that one of the BeanK has 'wrongly created object of type BeanW' injected.
When you get rid of beanWAlias from the test.xml - test passes.
Look on BeanD - at first time it throws exception during construction - it leads to destorying of eagerly created singletons - but the destruction is not correct/full - beanK remains in the context. It is because 'alias' is used.
Tomasz Bech opened SPR-7254 and commented
Under some conditions, spring context is wrongly created.
Problem appears when:
The original problem happened with cxf library and thousands of objects in spring context. Out of that, hopefully, I was able to build the testcase. It is attached - as separate project (maven).
As it is, it fails with NullPointerException - this means that one of the BeanK has 'wrongly created object of type BeanW' injected.
When you get rid of beanWAlias from the test.xml - test passes.
Look on BeanD - at first time it throws exception during construction - it leads to destorying of eagerly created singletons - but the destruction is not correct/full - beanK remains in the context. It is because 'alias' is used.
Affects: 2.5.6
Attachments:
Referenced from: commits de866a0
The text was updated successfully, but these errors were encountered: