Two Laptop Bag*
The moose likes Spring and the fly likes AOP configuration seems to be invalid Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "AOP configuration seems to be invalid" Watch "AOP configuration seems to be invalid" New topic
Author

AOP configuration seems to be invalid

Zhixiong Pan
Ranch Hand

Joined: Jan 25, 2006
Posts: 239
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.


SCJP 1.4 SCJD
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

Does your HelloSpeaker class implement the IHello interface

Please post the HelloSpeaker class code here.

Thanks

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Zhixiong Pan
Ranch Hand

Joined: Jan 25, 2006
Posts: 239
Thanks Mark,

The cause is that the HelloSpeaker implemented another IHello interface from an incorrect package.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: AOP configuration seems to be invalid