Hi
I am stuck on a weird issue. I have added a new AOP point cut and an around advice in the spring xml file. After adding this, the application context creation fails saying that some of the bean creation failed. These beans are no where related to the my changes. But after adding my aop tags, looks like spring is trying to create these beans in a different way. If I comment out my aop.around advice, it works fine. Can anybody tell whats the root cause and possible ways to resolve it.
My Spring configuration
ErrorCode:<bean id="myAdvice" class="x.y.z.MyAdvice"> <property name="log" ref="myLog" /> <property name="myProperties"> <util:properties location="file:${myFileLocation}" /> </property> </bean> <aop:config> <aop:aspect ref="myAdvice"> <aop:pointcut id="myExecution" expression="execution(* x.y.z.MyServiceImpl.add(..)) and args(arg1, arg2)"/> <aop:around pointcut-ref="myExecution" method="handleMyExecution"/> </aop:aspect> </aop:config>
Spring version="3.0.0.RELEASE"Code:2012-07-17 13:52:25,493 ERROR context.ContextLoader - Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'abcCRUDHandler' defined in class path resource [META-INF/abc/abc_base.xml]: Cannot resolve reference to bean 'abcQueryHandler' while setting bean property 'providers' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'abcQueryHandler': Post-processing of the FactoryBean's object failed; nested exception is org.aspectj.weaver.reflect.ReflectionWorld$ReflectionWorldException: warning can't determine superclass of missing type $Proxy274 [Xlint:cantFindType] at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)


Reply With Quote