• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

AOP configuration seems to be invalid

 
Zhixiong Pan
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am a new learner on Spring 1.2 AOP.
The configure file beans-config.xml is like:


In a test application class I have below code:


The before advice method can be called, but after that the advice method didn't get called. The error log is like:
Exception in thread "main" org.springframework.aop.AopInvocationException: AOP configuration seems to be invalid: tried calling method [public abstract void com.denny_blue.springdemo.aop.IHello.hello(java.lang.String)] on target [com.denny_blue.springdemo.aop.HelloSpeaker@18dfef8]; nested exception is java.lang.IllegalArgumentException: object is not an instance of declaring class


If you have an idea, please advice. Thanks.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does your HelloSpeaker class implement the IHello interface

Please post the HelloSpeaker class code here.

Thanks

Mark
 
Zhixiong Pan
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Mark,

The cause is that the HelloSpeaker implemented another IHello interface from an incorrect package.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic