File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Spring and the fly likes Problem in configiring Spring aspects Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Problem in configiring Spring aspects" Watch "Problem in configiring Spring aspects" New topic

Problem in configiring Spring aspects

RajivAwadhesh kumar

Joined: May 20, 2011
Posts: 24
Hi ,

I tried the example of Spring aspects given in Spring in Action 3rd Edition(Manning).
I am having the problem while running the example.
Following are the java source files and xml configuration file.


The error am getting is follows

Please suggest what is the error?
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

You are misisng the aopalliance.jar file from your classpath. To use Spring and Spring AOP requires jar files in your classpath. It is more than just one jar, and it appears that you have at least one jar missing.


Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
RajivAwadhesh kumar

Joined: May 20, 2011
Posts: 24
I added the necessary jars.. I had thought that all jars would be available with
the Spring 3.0 distribution i downloaded and added in my classpath.

But few of the jars were missing..When aop is integral to Spring
i cant understand why we have to add some jars separately
Mohit J Kumar
Ranch Hand

Joined: Apr 08, 2010
Posts: 33

Hell Everyone,

I am getting the exact same error. I am also following Spring in Action 3rd edition and trying the same example.

After a lot of google search I found that the best possible way to resolve this is to add aopalliance.jar seperately.

I also tried adding: aopalliance.jar & aopalliance-alpha1.jar individually and together but the error won't go away.

Please help.

Is there any other jar I need to add in addition to aopalliance.jar. I am using Spring 3.2


"It's good to B in touch...So keep responding"
Gamini Sirisena
Ranch Hand

Joined: Aug 05, 2008
Posts: 378
Hi Mohit, based on your request here

I managed to get this running.. but oops.. with Maven..

but I guess since you have the project in Eclipse and this seems to be an dependency issue you could check if you have all these dependencies in the project build path..


I agree. Here's the link:
subject: Problem in configiring Spring aspects
It's not a secret anymore!