Announcement Announcement Module
No announcement yet.
proxying AOP dependency runtime issue with spring 2.0.6 for after-returning advice Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • proxying AOP dependency runtime issue with spring 2.0.6 for after-returning advice


    I am a newbie at Spring AOP and it appears that I am having compatibility issues with dependencies.

    I am using spring version 2.0.6 and and doing proxying AOP.

    Spring config snippet


    <bean name="projectsDao"



    <bean name="securityAdviser"

    class="com.markettools.aop.advise.SecurityAdviser" >



    <aopointcut id="activityCheckPointCut"

    expression="execution(* com.markettools.aop.domain.ServiceFacade.*())"/>

    <aopointcut id="filterResultsPointCut"

    expression="execution(* com.markettools.aop.domain.ProjectsDao.*())"/>

    <aop:aspect id="myAspect" ref="securityAdviser">

    <aop:before pointcut-ref="activityCheckPointCut" method="checkMethodAccessSecurity" />

    <aop:after-returning pointcut-ref="filterResultsPointCut" method="filterResults" returning="retVal"/>




    SecurityAdviser snippet


    * DOCME!


    * @since 9/17/07


    public void filterResults(Object retVal) {

    System.out.println("do nothing for now");


    To make ‘before’ advice work I had to declare dependencies on aspectj weaver and aspectjrt 1.5.3, asm 2.2.3 and cglib 2.1_3 – this is the only combination I was able to make it run successfully, but it runs as expected.

    However, when I am trying to create ‘after-returning’ advice, I am getting runtime exceptions

    Caused by: java.lang.AbstractMethodError: org.springframework.core.LocalVariableTableParamet erNameDiscoverer$FindMethodParameterNamesClassVisi tor.visit(IILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/StringV

    at org.objectweb.asm.ClassReader.accept(Unknown Source)

    at org.objectweb.asm.ClassReader.accept(Unknown Source)

    at org.springframework.core.LocalVariableTableParamet erNameDiscoverer.visitMethod(LocalVariableTablePar

    I suspect my dependency list is incorrect but I am having hard time figuring the correct dependencies and their versions.


  • #2

    i figured it out - the trick is to make sure that cglib does not pull it it's dependencies during build as it depends on older version of asm.

    this mvn configuration seem to work