AOP i BeanCurrentlyInCreationException

11 views
Skip to first unread message

Hamster

unread,
Mar 8, 2007, 7:39:18 AM3/8/07
to Spring User Group Poland
Czesc,

W Spring 2.x uzywam sobie smialo aop:config i wszystkiego wokol,
natrafilem jednak na problem:

Mam dwa beany A i B, oraz aspekt C. C jest nakladane na B przy czym A
jest wstrzykniete do C. Wszystko ladnie dziala do momoentu az chce
nalozyc nowy aspekt C' na A.

Wowczas spring powinien:
1. zainicjalizowac A i C', nalozyc C' na A - przez co powstanie A'
2. wstrzyknac A' do C
3. zaincjalizowac B i nalozyc C (z wstrzyknietym A' a nie A) ;]

Heh, oczywiscie tak nie robi i sypie wyjatkiem:

org.springframework.beans.factory.BeanCurrentlyInCreationException:
Error creating bean with name A: Bean with name A has been injected
into other beans [C] in its raw version as part of a circular
reference, but has eventually been wrapped (for example as part of
auto-proxy creation). This means that said other beans do not use the
final version of the bean. This is often the result of over-eager type
matching - consider using "getBeanNamesOfType" with the
"allowEagerInit" flag turned off, for example.

...

Jakis pomysl? Probowalem depends-on usatwic zeby wymusic kolejnosc ale
nie pomoglo ;(

Reply all
Reply to author
Forward
0 new messages