version: 1.1.3
Hi, I have a case where 2 proxied beans (A and B) are injected to each other and I am getting the following error:
If I comment out one side or the other of the dependency (by commenting out the setter method of one DAO class or the other), the proxies resolve fine (i.e. no error), here is my config snippet:Cannot create AopProxy with no Advisors and no target source
In "A" I define the method setBDAO(...) and in B I define the method setADAO(...).Code:<bean id="aDAO" class="org.springframework.aop.framework.ProxyFactoryBean"> <property name="target"> <bean class="dao.hibernate.ADAOImpl" autowire="byName" /> </property> <property name="interceptorNames"> <list> <value>stripAdvisor</value> </list> </property> </bean> <bean id="bDAO" class="org.springframework.aop.framework.ProxyFactoryBean"> <property name="target"> <bean class="dao.hibernate.BDAOImpl" autowire="byName" /> </property> <property name="interceptorNames"> <list> <value>stripAdvisor</value> </list> </property> </bean>
Any ideas for why this would happen and what I can do to avoid this issue (perhaps by avoiding CGLIB proxying) Do I need to autowire the proxy rather then the proxied bean? All my other relationships work fine (and are wired precisely the same way). :?
Cheers
Steve


Reply With Quote