Announcement Announcement Module
No announcement yet.
annotation problem with Pointcut in Logger Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • annotation problem with Pointcut in Logger

    I have used a logger class with below snippet.
    @Pointcut("execution(* com.wqe.aaf.asas.*.*.*(..)) ")
    public void methodPointCut() {


    and so on.

    but it is giving below exception.

    java.lang.IllegalArgumentException: error at ::0 can't find referenced pointcut methodPointCut
    at cutExpression(
    at org.springframework.aop.aspectj.AspectJExpressionP ointcut.buildPointcutExpression(AspectJExpressionP
    at org.springframework.aop.aspectj.AspectJExpressionP ointcut.checkReadyToMatch(AspectJExpressionPointcu
    at org.springframework.aop.aspectj.AspectJExpressionP ointcut.getClassFilter(AspectJExpressionPointcut.j ava:162)

    I have annotation jar in lib with names hibernate-commons-annotations.jar,hibernate-annotations.jar and hibernate-commons-annotations.3.2.0.Beta1.jar,ehcache-spring-annotations-1.1.3.jar.

    Are these hibernate jars creating conflict with spring annotation?

    Please help in this regard.

  • #2
    No the problem is you must specify package and class of pointcut method when you use it in the @Before:

    otherwise pointcut method is not found and its @Pointcut annotation can't be processed using reflection.


    • #3
      tried the same u mentioned but getting the same exception.error at ::0 can't find referenced pointcut methodPointCut


      • #4
        hmmm you should post your Spring config and aspect class code (remember to use the [ CODE] tags!)


        • #5
          thank you a lot for trying, and i am glad to share the problem is resolved.
          it was the problem with jars i used for aspect
          i replaced aspectjweaver-1.5.2.jar and aspectjrt-1.1.1.jar with
          aspectjweaver.jar and aspectjrt.jar.
          Sorry for being lazy to identify which jar was faulty...
          but i got a great relief
          thank you