• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Problem with Spring AOP

 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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: 17346
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
  • 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
  • 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: 17346
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
  • 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>
 
A wop bop a lu bob a womp bam boom. Tutti frutti ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic