Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Internal error in CFlowCounter when using cflow

Dear all,

I have tried to execute simple cflow examples from the programming
guide, which systematically raise an exception in the initialization of
the internal.CFlowCounter. I am using the ajdt plugin, version 1.4.1,
and Eclipse 3.2.1. Other examples work well.

This smells some configuration problem or internal aspectJ bug to me,
is there a known issue?

Any hint or help would be greatly appreciated, I am eager to use the
cflow construct...

Thanks in advance,

Mirko


==== The exception:
java.lang.NoSuchMethodError:
org.aspectj.runtime.internal.cflowstack.ThreadStackFactory.getNewThreadCounter()Lorg/aspectj/runtime/internal/cflowstack/ThreadCounter;
	at
org.aspectj.runtime.internal.CFlowCounter.<init>(CFlowCounter.java:33)
	at
ch.hcuge.mdt.agenda.pln.commun.aspect.A.ajc$preClinit(TestCflowAspect.aj:1)
	at
ch.hcuge.mdt.agenda.pln.commun.aspect.A.<clinit>(TestCflowAspect.aj)
	at ch.hcuge.mdt.agenda.pln.commun.aspect.Test.foo(Test.java)
	at
ch.hcuge.mdt.agenda.pln.commun.aspect.Test.main(Test.java:19)
Exception in thread "main" 

=== Test class and aspect (from
http://www.eclipse.org/aspectj/doc/released/progguide/language-joinPoints.html)

public class Test {
    public static void main(String[] args) {
        foo();
    }
    static void foo() {
        goo();
    }
    static void goo() {
        System.out.println("hi");
    }
}

aspect A  {
    pointcut fooPC(): execution(void Test.foo());
    pointcut gooPC(): execution(void Test.goo());
    pointcut printPC(): call(void
java.io.PrintStream.println(String));

    before(): cflow(fooPC()) && cflow(gooPC()) && printPC() &&
!within(A) {
        System.out.println("should occur");
    }

    before(): cflow(fooPC() && gooPC()) && printPC() && !within(A) {
        System.out.println("should not occur");
    }
}

**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**********************************************************************



Back to the top