File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Aspect Oriented Programming and the fly likes Spring AOP @AfterThrowing Advice not being executed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Aspect Oriented Programming
Bookmark "Spring AOP @AfterThrowing Advice not being executed" Watch "Spring AOP @AfterThrowing Advice not being executed" New topic
Author

Spring AOP @AfterThrowing Advice not being executed

Roshni Chandrashekar
Greenhorn

Joined: Jan 14, 2012
Posts: 5
The @AfterThrowing advice I have defined is not getting executed. Could some one take a look and please help me out? Below is the code I am using.

Pom.xml




spring-context.xml



LoggingAspect.java



SampleClassUnderAOP


TestAOP unit test class


Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1632
    
    7

You don't have an interface so the proxy is not being called. If you are going to go this route you need to force the use of CGLIB class proxying (or use full AspectJ rather than Springs)

Try


[How To Ask Questions][Read before you PM me]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Spring AOP @AfterThrowing Advice not being executed
 
Similar Threads
Error creating bean 'org.spring....PersistenceExceptionTranslationPostProcessor#0'
Spring 3.0.2 and Active MQ 5.4.1 Issues
Error creating bean 'org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcesso
Spring Major version '3' expected
No mapping found for HTTP request with URI - Why erreur404