• 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

Spring AOP Help

 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Sirs et Madames,
I am experiencing a few issues in regards to using Spring AOP.

Currently the application runs with no exceptions , but in order to achieve what I need to achieve, I have to define an aspect in my applicationContext.xml file. However, as soon as I introduce the following element:



I get the following error stack trace:



Has anyone any idea why this may happen? The only change I have made so far is added those 2 lines
<aop:config>
</aop:config>

I have also imported the relevant namespaces for AOP ( I think ) like so:


can anyone please advise?
Thanks in advance.


 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The base exception is here -


# 2010-05-04 18:32:48.138::WARN: Nested in org.springframework.beans.factory.BeanCreationException:
# Error creating bean with name 'org.springframework.security.config.http.UserDetailsServiceInjectionBeanPostProcessor#0':
# Initialization of bean failed; nested exception is java.lang.ClassCastException:
# org.springframework.transaction.annotation.AnnotationTransactionAttributeSource cannot be cast to
# org.openhds.dao.finder.FinderExecutor: java.lang.ClassCastException:
# org.springframework.transaction.annotation.AnnotationTransactionAttributeSource cannot be cast to
# org.openhds.dao.finder.FinderExecutor
# at org.openhds.dao.finder.Interceptor.invoke(Interceptor.java:19)



What's at org.openhds.dao.finder.Interceptor.invoke(Interceptor.java:19)?

What does the org.openhds.dao.finder.FinderExecutor class have in it?
 
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
did you use @Aspect annotation? if you use aspect annotation you don't need to introduce the <aop/> tag in your configuration file.
 
Phoenix Kilimba
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Nathan Pruett wrote:The base exception is here -


# 2010-05-04 18:32:48.138::WARN: Nested in org.springframework.beans.factory.BeanCreationException:
# Error creating bean with name 'org.springframework.security.config.http.UserDetailsServiceInjectionBeanPostProcessor#0':
# Initialization of bean failed; nested exception is java.lang.ClassCastException:
# org.springframework.transaction.annotation.AnnotationTransactionAttributeSource cannot be cast to
# org.openhds.dao.finder.FinderExecutor: java.lang.ClassCastException:
# org.springframework.transaction.annotation.AnnotationTransactionAttributeSource cannot be cast to
# org.openhds.dao.finder.FinderExecutor
# at org.openhds.dao.finder.Interceptor.invoke(Interceptor.java:19)



What's at org.openhds.dao.finder.Interceptor.invoke(Interceptor.java:19)?

What does the org.openhds.dao.finder.FinderExecutor class have in it?



Well the Interceptor class is like so:



And the FinderExecutor is like:



Hope this helps. Thanks again
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic