• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem with Spring AOP

 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have practicing Spring AOP and took an example from online.

I have the advice and pointcuts are given below

###==================== Before Advice CLASS : BeforeAdvice.java =====================




###==================== Before Advice CLASS : BeforeAdvice.java end =====================



###==================== Before Advice CLASS : ExceptionLoggingAdvice.java Start=====================

###==================== Before Advice CLASS : ExceptionLoggingAdvice.java end =====================

###==================== Before Advice CLASS : MethodPerformanceAdvice.java Start=====================

###==================== Before Advice CLASS : ExceptionLoggingAdvice.java end =====================

And my config file below.




On executing I am getting following error. I suspect the arguments in Before or Around advise.



Please help me understand the problem and the fix to it.

Thanks in advance for your help.

Also Thanks for going over my issue.

Regards,

Swaroop Kunduru.

 
Ranch Hand
Posts: 218
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The serviceCall methods are private, this might be the cause. Make these methods public & try.
 
Swaroop Kunduru
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for Reply Rishi,

I changed ServiceCall to public method but the error is the same no change.

Regards,

Swaroop Kunduru.
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not sure if this would be your issue, but you have three named pointcuts, all those methods are private, might need to be public, and they all should have different names. You have them all called serviceCall(). Try having different names. and Make sure you update your @Before etc..

Mark
 
Swaroop Kunduru
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Any one know what it mean in line number 18 in the error log?

Regards,

Swaroop Kunduru.

 
Mark Spritzler
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Swaroop Kunduru wrote:Any one know what it mean in line number 18 in the error log?

Regards,

Swaroop Kunduru.



This one?

WARNING: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:ContactsWebApp' did not find a matching property.

Means that ContactsWebApp does not have a setSource method. <property name="source"… means that Spring will call the setSource() method.

Mark>
 
She's brilliant. She can see what can be and is not limited to what is. And she knows this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic