[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] weave all methods in rt.jar

Hi there


I would like to instrument all methods in rt.jar. Here is my code 


public aspect CallInterceptor {
pointcut allMethods():
        !within(CallInterceptor)  && execution(* *(..));

    before() : allMethods() {
    Signature sig=thisJoinPointStaticPart.getSignature();
    String method=sig.getDeclaringTypeName()+"."+sig.getName();
    System.out.println("enter "+method);            
    }

    after() : allMethods() {
    System.out.println("exit");
    }
}


After weaving, I prepended weaved rt.jar to boot classpath and got the following error:
Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Object

any help would be appreciated.

Cheers
Li