Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Example problem from Spring in Action AOP

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello everyone, I am very new to the Spring development and I want to learn in without going through expensive courses.
Because of that I bought a book Manning Spring in Action 2nd Edition. That book being much more understandable than other references
I try to follow every example with Netbeans IDE which supports Spring 2.5 library. Now I am stuck in the 2nd exercise of the first chapter
of the book.Here is the class I hope you are


Try catch is for my self because otherwise it throws a huge number of errors. So far I can catch this error

This is the XML code that should do the trick but it doesn't



I am a person who can understand things properly in their execution. So if you can help me that will be brilliant.
For the full code source code is available in http://www.manning.com/walls3/ and in that source code its chapter 1's knights example.
Once again a simple solution which I can do with Netbeans will be very appreciated.
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Looks like you're missing library dependencies.
 
Bahadir Mert Uzan
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

David Newton wrote:Looks like you're missing library dependencies.



I have both used netbeans 2.5 Spring library, downloaded the zip version with dependencies and add it to my project.
Doesn't solve it. :(
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What libraries are you deploying?
 
Bahadir Mert Uzan
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

David Newton wrote:What libraries are you deploying?



Spring Framework 2.5 -
commons-logging-1.1.jar
cglib-2-2.jar
-spring-2.5.jar (sorry it's a little late in here)
alse everything from Spring-framework-2.5.6.Sec01 zip
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What's "soring-2.5.jar"? In any case, when you say "everything", it'd really be a LOT more useful if you just told us what you're deploying, rather than making us do all the work.
 
Bahadir Mert Uzan
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

David Newton wrote:What's "soring-2.5.jar"? In any case, when you say "everything", it'd really be a LOT more useful if you just told us what you're deploying, rather than making us do all the work.



A very simple java application with java classes. Its about 9 simple classes and I am trying to learn AOP. I ll show you how easy the classes are.


and the other class
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not what I asked. I asked you to list, specifically, the libraries you're deploying. Or maybe how you're trying to run it. One way or another, the missing class isn't there when the program is being run.
 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

David Newton wrote:Looks like you're missing library dependencies.



just add this library : aspectjrt.jar ---> (spring-framework-2.5.6.SEC01\lib\aspectj)

Hope this could help.
 
Bahadir Mert Uzan
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Rendi Artawijaya wrote:

David Newton wrote:Looks like you're missing library dependencies.



just add this library : aspectjrt.jar ---> (spring-framework-2.5.6.SEC01\lib\aspectj)

Hope this could help.



Yes I add both aspectjrt.jar and aspectweaver.jar and it works. Strange I thought these would have resided in Spring Libraries that Netbeans have.
Thanks everyone.
About Deployment I don't know the details but netbeans usually do jar modification and other stuff it self. I don't think it does anything fancy.
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Jar modification"? "Deployed" means "what jars are on the classpath when you execute the program."
 
Bahadir Mert Uzan
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

David Newton wrote:"Jar modification"? "Deployed" means "what jars are on the classpath when you execute the program."



I deploy them with these libraries attached.
(these are from libraries in Netbeans Spring Framework2.5)
commons-logging-1-1.jar
cglib-2.2.jar
spring2.5.jar

and these 2 that solved the problem

aspectjrt.jar
aspectweaver.jar
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, I saw that it was already solved. I was trying to clear up your confusion about terminology.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic