aspose file tools
The moose likes Spring and the fly likes Problem with setting the Pointcut and advice Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Frameworks » Spring
Reply Bookmark "Problem with setting the Pointcut and advice" Watch "Problem with setting the Pointcut and advice" New topic
Author

Problem with setting the Pointcut and advice

jigar babaria
Greenhorn

Joined: Jun 04, 2010
Posts: 7
Hi
I am trying AOP for the first time. I have define the following bean:

<bean id="audienceAdvisor" class="org.springframework.aop.support.DefaultPointcutAdvisor">
<property name="advice" ref="audienceAdvice">
</property>
<property name="pointcut" ref="performancepointcut">
</property>
</bean>

Here ref "audienceAdvice" is the bean that implements MethodInterceptor interface & ref "performancePointcut" is a bean with class "org.springframework.aop.support.DefaultPointcutAdvisor"
While running the program I am getting the following error message:

Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'audienceAdvisor' defined in file [F:\Eclipse\eclipse\workspace\First Spring Project\bean.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: org/aopalliance/aop/Advice

It looks like error is related to the propery "advice" of the above bean.(Not sure). I have also added the "aopalliance-alpha1.jar in my classpath.

Can someone please help me out with this problem?

thanks
Jigar Babaria

 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Problem with setting the Pointcut and advice
 
Similar Threads
why 'value' for interceptorNames instead of 'ref'
Methods on advice are not being called
spring AOP doesn't work
Advice PointCut methods not being called?
unable to call AOP method