Skip to main content

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


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