[에러:순환참조] in its raw version as part of a circular reference

2,896 views
Skip to first unread message

박창준

unread,
Dec 9, 2009, 8:27:16 PM12/9/09
to Korea Spring User Group
버전 : spring 2.5
순환참조관련에러인데 어떻게 해결해야 할지 모르겠습니다.
검색을 해봐도 뭘 어떻게 해야할지 감도 못잡겠고.. ^^;;
도움요청합니다.

[에러메세지]
[BORD0060_Biz] 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.
at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference
(BeanDefinitionValueResolver.java:274)
at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary
(BeanDefinitionValueResolver.java:104)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues
(AbstractAutowireCapableBeanFactory.java:1274)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean
(AbstractAutowireCapableBeanFactory.java:1042)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean
(AbstractAutowireCapableBeanFactory.java:539)
Truncated. see log file for complete stacktrace
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'BORD0010_Biz' defined in ServletContext
resource [/WEB-INF/xml/spring/applicationContext_ord_biz.xml]: Cannot
resolve reference to bean 'BORD0050_Biz' while setting bean property
'bord0050Biz'; nested exception is
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'BORD0050_Biz' defined in ServletContext
resource [/WEB-INF/xml/spring/applicationContext_ord_biz.xml]: Cannot
resolve reference to bean 'BORD0020_Biz' while setting bean property
'bord0020Biz'; nested exception is
org.springframework.beans.factory.BeanCurrentlyInCreationException:
Error creating bean with name 'BORD0020_Biz': Bean with name
'BORD0020_Biz' has been injected into other beans [BORD0060_Biz] 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.
at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference
(BeanDefinitionValueResolver.java:274)
at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary
(BeanDefinitionValueResolver.java:104)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues
(AbstractAutowireCapableBeanFactory.java:1274)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean
(AbstractAutowireCapableBeanFactory.java:1042)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean
(AbstractAutowireCapableBeanFactory.java:539)
Truncated. see log file for complete stacktrace
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'BORD0050_Biz' defined in ServletContext
resource [/WEB-INF/xml/spring/applicationContext_ord_biz.xml]: Cannot
resolve reference to bean 'BORD0020_Biz' while setting bean property
'bord0020Biz'; nested exception is
org.springframework.beans.factory.BeanCurrentlyInCreationException:
Error creating bean with name 'BORD0020_Biz': Bean with name
'BORD0020_Biz' has been injected into other beans [BORD0060_Biz] 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.
at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference
(BeanDefinitionValueResolver.java:274)
at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary
(BeanDefinitionValueResolver.java:104)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues
(AbstractAutowireCapableBeanFactory.java:1274)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean
(AbstractAutowireCapableBeanFactory.java:1042)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean
(AbstractAutowireCapableBeanFactory.java:539)
Truncated. see log file for complete stacktrace
org.springframework.beans.factory.BeanCurrentlyInCreationException:
Error creating bean with name 'BORD0020_Biz': Bean with name
'BORD0020_Biz' has been injected into other beans [BORD0060_Biz] 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.
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean
(AbstractAutowireCapableBeanFactory.java:553)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
$1.run(AbstractAutowireCapableBeanFactory.java:485)
at java.security.AccessController.doPrivileged(Native Method)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean
(AbstractAutowireCapableBeanFactory.java:455)
at org.springframework.beans.factory.support.AbstractBeanFactory
$1.getObject(AbstractBeanFactory.java:251)
Truncated. see log file for complete stacktrace
>
<2009. 12. 10 오전 10시 22분 09초 KST> <Error> <Deployer> <BEA-149231>
<Unable to set the activation state to true for the application
'KtPointWebApp'.
weblogic.application.ModuleException:
at weblogic.servlet.internal.WebAppModule.startContexts
(WebAppModule.java:975)
at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:
361)
at weblogic.application.internal.flow.ModuleStateDriver$3.next
(ModuleStateDriver.java:204)
at weblogic.application.utils.StateMachineDriver.nextState
(StateMachineDriver.java:26)
at weblogic.application.internal.flow.ModuleStateDriver.start
(ModuleStateDriver.java:60)
Truncated. see log file for complete stacktrace
org.springframework.beans.factory.BeanCurrentlyInCreationException:
Error creating bean with name 'BORD0020_Biz': Bean with name
'BORD0020_Biz' has been injected into other beans [BORD0060_Biz] 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.
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean
(AbstractAutowireCapableBeanFactory.java:553)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
$1.run(AbstractAutowireCapableBeanFactory.java:485)
at java.security.AccessController.doPrivileged(Native Method)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean
(AbstractAutowireCapableBeanFactory.java:455)
at org.springframework.beans.factory.support.AbstractBeanFactory
$1.getObject(AbstractBeanFactory.java:251)
Truncated. see log file for complete stacktrace
>
<2009. 12. 10 오전 10시 22분 09초 KST> <Notice> <Log Management>
<BEA-170027> <The server initialized the domain log broadcaster
successfully. Log messages will now be broadcasted to the domain log.>

박창준

unread,
Dec 9, 2009, 8:42:44 PM12/9/09
to Korea Spring User Group
추가내용입니다.

A 인터페이스를 상속받은 AA, BB클래스가 CC클래스로 setter하고 있습니다.

public class CC {
A aa = null;
A bb = null;

public void setAa(A) {
}
public void setBb(A) {
}

이부분도 문제가 되는건지... ㅡㅡ;;;

백기선

unread,
Dec 9, 2009, 8:49:01 PM12/9/09
to ks...@googlegroups.com
빈 설정도 올려 주시면 좋을 것 같아요.

근데 빈 이름들이 좀;; 거시기 하네요; @_@;

2009년 12월 10일 오전 10:42, 박창준 <cine...@naver.com>님의 말:



--
좋은 하루 되세요~

백기선

unread,
Dec 9, 2009, 8:54:22 PM12/9/09
to ks...@googlegroups.com
http://forum.springsource.org/showthread.php?t=42748

http://forum.springsource.org/showthread.php?t=32841


2009년 12월 10일 오전 10:49, 백기선 <whites...@gmail.com>님의 말:



--
좋은 하루 되세요~

박성철

unread,
Dec 9, 2009, 8:59:48 PM12/9/09
to ks...@googlegroups.com
빈 설정에 lazy-init="true"를 추가해 보세요.

그리고 순환 참조가 일어났다는 것 자체가 설계상 오류일 가능성이 높습니다.

Sewon Ann

unread,
Dec 9, 2009, 11:40:09 PM12/9/09
to ks...@googlegroups.com
저도 성철님 의견에 동의합니다. 물론 비즈니스에 따라 다르겠지만, spring 설정을 바꾸기보다는 refactoring 으로 접근해 보시는 것은 어떨까요? 잘 되면 일석이조라고 생각합니다.


2009/12/10 박성철 <gyu...@gmail.com>
Reply all
Reply to author
Forward
0 new messages