0 Replies Latest reply on Mar 15, 2016 4:02 AM by mohan.kumar.muddana

    Migrating Spring AspectJ AOP from JBOSS 4 to JBOSS6 fails

    mohan.kumar.muddana

      Here is the AOP-Config file. I am using Spring AspectJ


      <aop:config>

      <aop:pointcut id="allServiceMethodsWithAnnot"

      expression="@within(org.springframework.transaction.annotation.Transactional) ||

      @annotation(org.springframework.transaction.annotation.Transactional)" />

       

      <aop:pointcut id="allHPBMethods" expression="execution(* com.aon..*HPB.*(..))" />

       

      <aop:advisor advice-ref="txAdvice" pointcut-ref="allServiceMethodsWithAnnot" />

       

      <aop:aspect id="eventSyncAspect" ref="eventTransactionSync">

      <aop:before method="eventSync" pointcut-ref="allServiceMethodsWithAnnot" />

      </aop:aspect>

       

      <aop:aspect id="exceptionHandlingAspect" ref="exceptionHandling">

      <aop:after-throwing throwing="ex"

      method="afterHibernateException" pointcut-ref="allServiceMethodsWithAnnot" />

      </aop:aspect>

       

      <aop:aspect id="hibernatePersistenceBrokerAspect" ref="hibernatePersistenceBrokerInterceptor">

      <aop:around method="doProfilling" pointcut-ref="allHPBMethods" />

      </aop:aspect>

      </aop:config>

       

       

      And getting the following error

      exception is java.lang.IllegalArgumentException: error Type referred to is not an annotation type: org$springframework$transaction$annotation$Transactional

      at org.aspectj.weaver.tools.PointcutParser.parsePointcutExpression(PointcutParser.java:301) [aspectjweaver-1.7.0.jar:1.7.0] at org.springframework.aop.aspectj.AspectJExpressionPointcut.buildPointcutExpression(AspectJExpressionPointcut.java:207)