BleacherSeat (4) [Avatar] Offline
#1
Guys ,
when I use the following code snippet . I am getting a weird exception:


import org.aspectj.lang.*;

public aspect TraceAspect {

pointcut traceMethods() : (execution(* *.*(..)) || execution(*.new(..))) && !within(TraceAspect);

before() : traceMethods() {
Signature sig = thisJoinPointStaticPart.getSignature();
System.out.println("Entering [ Class -> " + sig.getDeclaringType().getName() + " Method -> " + sig.getName() + "]"smilie;
}


}

I get this exception when I use
Signature sig = thisJoinPointStaticPart.getSignature(); in the advice. If i replace the advice code with a simple print statement. My aspect just works fine. Any pointers are appreciated. Thanks for your help in advance.

---------------------------------------------------------------------------

Exception:

java.lang.Exception: java.lang.NoSuchMethodError: org/aspectj/runtime/reflect/Factory.makeConstructorSig(Ljava/lang/String;
Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Stringsmilie
Lorg/aspectj/lang/reflect/ConstructorSignature;