aspose file tools*
The moose likes Aspect Oriented Programming and the fly likes Trouble getting started with AOP, what exactly are the dependencies? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Aspect Oriented Programming
Bookmark "Trouble getting started with AOP, what exactly are the dependencies?" Watch "Trouble getting started with AOP, what exactly are the dependencies?" New topic
Author

Trouble getting started with AOP, what exactly are the dependencies?

Toby Eggitt
Ranch Hand

Joined: Dec 08, 2004
Posts: 41
Hi all,

A long time ago in a galaxy far away, spring provided a jar that included all the dependencies. Well, they don't do that any more, and that's fair enough.... But, given that I don't use (and don't want to use) Maven/Ivy etc. how do I know what supporting jars I need, and where do I find them.

I've been rummaging in the spring docs for two days now, on and off, and have failed to find it. I've been chasing down the class not found exceptions one at a time, and each has just led to something new. Now I have a class not found but all the online comments I can find about that particular class claim that I need a jar I already have (the jar really does not contain the problem class).

Can anyone give a complete list, ideally with the locations they should come from to ensure they're the right versions?

Thanks all!
Toby
William P O'Sullivan
Ranch Hand

Joined: Mar 28, 2012
Posts: 859

Go here:

http://www.springsource.org/spring-framework#download

download Spring Framework from: http://s3.amazonaws.com/dist.springframework.org/release/SPR/spring-framework-3.1.1.RELEASE.zip

Unzip and Install into a well-known and accessible location. This is where you will locate the jars.

Now that you have the framework, and you are correct, each module is now nicely independently packaged,
from http://www.springsource.org/documentation pick which one interests
you. For instance, if you want to play with SpringBatch then download that.

Pat.
Toby Eggitt
Ranch Hand

Joined: Dec 08, 2004
Posts: 41
Hi Pat, thanks for your reply, unfortunately, that doesn't (appear to) work.

The archive contains all the Spring stuff, but not the dependencies. I have the Spring stuff already, but I'm trying to work with AOP, and that needs more support. I've chased down AspectJ, AOP Alliance, and some other things, but do not yet have a full working set, nor do I know if the particular versions I have are the right ones, so I'm still getting class not found exceptions. It's the external dependencies I need to know about, rather than the core jar. Sorry I wasn't clear.

Thanks again,
Toby.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17257
    
    6

From my pom files, all for AOP.



Mark


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

Joined: Dec 08, 2004
Posts: 41
Thanks Mark

I'm not quite sure how to use this info. I have those components, but I think that perhaps it's AspectJ that has further dependencies.

Ah well, I can probably stick with 2.5.5, which is behaving for me, until I learn to use Maven.

Thanks for trying guys, I really appreciate the effort!

Toby
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17257
    
    6

Well the artifact ids are the jar file names.

Mark
Toby Eggitt
Ranch Hand

Joined: Dec 08, 2004
Posts: 41
I get that, but it seems there are transitive dependencies too, and those are not listed. B uh t thanks anyway. I will stay with 2.5.5 until I can learn maven, I guess.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17257
    
    6

Toby Eggitt wrote:I get that, but it seems there are transitive dependencies too, and those are not listed. B uh t thanks anyway. I will stay with 2.5.5 until I can learn maven, I guess.


Maybe just the aopalliance jar. But there aren't any other jars that you need.

Mark
Jayesh A Lalwani
Bartender

Joined: Jan 17, 2008
Posts: 2409
    
  28

Well, if you are stuck, you could make a mini maven project with all the spring dependencies that you need, and run mvn dependency::tree to get all the dependencies. Much better than tracking down individual ClassNotFoundExceptions I think

I just ran it on my project, and I get this


[INFO] +- org.springframework:expression:jar:3.0.5:compile
[INFO] +- org.springframework:transaction:jar:3.0.5:compile
[INFO] +- org.springframework:core:jar:3.0.5:compile
[INFO] +- org.springframework:asm:jar:3.0.5:compile
[INFO] +- org.springframework:aop:jar:3.0.5:compile
[INFO] +- org.springframework:context:jar:3.0.5:compile
[INFO] +- org.springframework:context-support:jar:3.0.5:compile
[INFO] +- org.springframework:aspects:jar:3.0.5:compile
[INFO] +- com.springsource.org:aopalliance:jar:1.0.0:compile
[INFO] +- org.springframework:spring-orm:jar:3.0.5.RELEASE:compile
[INFO] | +- org.springframework:spring-core:jar:3.0.5.RELEASE:compile
[INFO] | | \- commons-logging:commons-logging:jar:1.1.1:compile
[INFO] | \- org.springframework:spring-jdbc:jar:3.0.5.RELEASE:compile
[INFO] +- org.springframework:spring-context:jar:3.0.5.RELEASE:compile
[INFO] | +- org.springframework:spring-aop:jar:3.0.5.RELEASE:compile
[INFO] | +- org.springframework:spring-expression:jar:3.0.5.RELEASE:compile
[INFO] | \- org.springframework:spring-asm:jar:3.0.5.RELEASE:compile
[INFO] +- org.springframework:spring-beans:jar:3.0.5.RELEASE:compile
[INFO] +- org.springframework:spring-tx:jar:3.0.5.RELEASE:compile
[INFO] | \- aopalliance:aopalliance:jar:1.0:compile
[INFO] +- junit:junit:jar:4.9:test
[INFO] | \- org.hamcrest:hamcrest-core:jar:1.1:test
[INFO] +- org.springframework:spring-test:jar:3.0.5.RELEASE:test
[INFO] +- org.hamcrest:hamcrest-all:jar:1.1:test
[INFO] \- org.mockito:mockito-core:jar:1.9.0-rc1:test
[INFO] \- org.objenesisbjenesis:jar:1.0:test

Doesn;t need much. Your problem might be that you have an older version of aopalliance.jar or commons-logging.jar. If you use maven to dwnload your dependencies, the correct version will end up in your local repo.
Manish Sridharan
Ranch Hand

Joined: Jul 19, 2005
Posts: 64
I too have similar dependency issue while using spring 3.1.1. I have downloaded following jars
1. aopalliance-1.0.jar
2. asm-all-4.0_RC1.jar
3. aspectj-1.6.12.jar
4. aspectjrt.jar
5. aspectjtools.jar
6. aspectjweaver.jar
7. cglib-2.2.2.jar
8. commons-dbcp-1.4.jar
9. commons-pool-1.6.jar

Perhaps this might help.

Thanks


Manish S.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Trouble getting started with AOP, what exactly are the dependencies?