Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] java.lang.IncompatibleClassChangeError with EnclosingStaticPart?

I'm using the annotation style to define the following advice:

@Before("shouldTrace() && logMessageMethod() && args(level,category,msg)")
public void traceMessage(JoinPoint.EnclosingStaticPart thisEnclosingJoinPointStaticPart,
                           LogLevel level, LogType category, String msg)
{
   Signature signature = thisEnclosingJoinPointStaticPart.getSignature();
   .....
}

Whenever this advice is executed, I get the following exception:

Failure Cause:  java.lang.IncompatibleClassChangeError
 org.opends.server.loggers.Tracer.traceMessage(Tracer.java:302)
 ...


Line 302 is the getSignature() line.

This error does not occur if I use JoinPoint.StaticPart or JoinPoint in the advice parameter. What could be the problem? I tired doing a completely clean build and the problem is still there.

Any help is greatly appreciated!

Bo

Relavent Info:

@Pointcut("call(public static void org.opends.server.loggers.TraceLogger.logMessage(..))")
 private void logMessageMethod()
 {
 }

 @Pointcut("if() && tracingScope()")
 public static boolean shouldTrace()
 {
   return TraceLogger.isEnabled();
 }

@


Back to the top