Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Rép. : Re: [aspectj-users] Internal error in CFlowCounter when using cflow

Dear Matthew,

It is as you said: I have been using the aspectJ runtime 1.2, without knowing it. That is, we are using Maven to build and deploy, and our pom.xml configuration file referenced aspectrt 1.2 as this is required by some of the libraries we use. Maybe the incremental compiler uses the 1.5.3 version living in the eclipse plugin, while at execution time (still in the eclipse environment, though) the one imported by Maven is given precedence. This still would not explain why these two classes got out of sync, but for now, I am happy to have my Aspect up and running :-)

Thank you very much for your tip.

Mirko

============================
Mirko Steinle
HUG
Direction d'informatique de gestion
Unité de développement
+41 22 372 85 22

>>> matthew_webster@xxxxxxxxxx 02/22/07 1:30  >>>
Mirko,

The method ThreadStackFactory.getNewThreadCounter() was introduced in 
AspectJ 1.2.1 (https://bugs.eclipse.org/bugs/show_bug.cgi?id=76030). 
Perhaps you are picking up an old aspectjrt.jar. If you are running in 
Eclipse you can check your classpath in the Debug perspective after the 
application has finished by bringing up the properties for the terminated 
process. Its strange though because both ThreadStackFactory and 
CFlowCounter are in aspectjrt.jar so I can't see how they would get out of 
step.

Matthew Webster
AOSD Project
Java Technology Centre, MP146
IBM United Kingdom Limited
Hursley Park, Winchester,  SO21 2JN, England
Telephone: +44 196 2816139 (external) 246139 (internal)



"Mirko STEINLE" <Mirko.Steinle@xxxxxxxx> 
Sent by: aspectj-users-bounces@xxxxxxxxxxx 
22/02/2007 08:06
Please respond to
aspectj-users@xxxxxxxxxxx 


To
<aspectj-users@xxxxxxxxxxx>
cc

Subject
[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.
**********************************************************************

_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx 
https://dev.eclipse.org/mailman/listinfo/aspectj-users 







Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 
741598. 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU







Back to the top