Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ajdt-dev] strange exception problem

Hi Andy,

I can't think of a change, but there might be one.  You could check
bugzilla for fixes committed between the dates of old and new (AspectJ
build dates, not AJDT ones).

Does it work if you let the aspects get woven?

Unfortunately not. I tried to find out more about what happens. My aspect "HelloWorldTracing" inherits from abstract aspect SimpleTracing (which contains the cflow).

Using the older AJDT build (1.5.2.200801291327) the HelloWorldTracing aspect gets the cflow field correctly (from AJDT directly within my workspace as well as after load-time weaving). Using a newer build of AJDT the HelloWorldTracing aspect gets the cflow field from AJDT within my workspace correctly BUT NOT after load-time weaving. The load-time woven class no longer contains the cflow field (nor the static initializer for the cflow). Very strange...?!? Where is the cflow field gone? ;-)

Unfortunately the other load-time woven classes (that are woven with the HelloWorldTracing aspect) get references injected to the cflow field...

Could it be that the load-time weaving somehow optimizes the cflow field away for any reasons?

-Martin





Andy.

2008/5/2 Martin Lippert <lippert@xxxxxxx>:
Hi Andy,



I think it needs to weave the aspect where the cflow pointcut occurs -
but I'd need to double check.

I don't believe the behaviour has changed, the only thing I added
recently was an error message saying "you need to weave the aspect"
which comes out with the cryptic cflowcounter message.  if you aren't
seeing that message then maybe your problem really is different.

 Hm, this seems to be very interesting. I have a hierarchy of three aspects
where the cflow pointcut is defined in the base class of this hierarchy and
I decompiled all three classfiles after weaving. Noone contains a field
definition for the cflow. Seems to me that my case might be indeed a
different one. Could any other change to the weaver code possibly created
this problem? I am so puzzled because an older build worked fine...



 -Martin



Andy

2008/5/2 Martin Lippert <lippert@xxxxxxx>:

Hi Andy,




I've seen that if you exclude the aspect from being woven in the XML
configuration for ltw - we must be able to weave the aspect if you are
using cflow since it will have that field added to it.   See bugs like
https://bugs.eclipse.org/bugs/show_bug.cgi?id=166647

Are you including the aspect in what can be woven?


 Thanks for the quick pointer to the bug. My issue seems to be closely
related but also slightly different... ;-)

 In my case I have an abstract aspect containing the cflow pointcut and
a
concrete aspect inheriting from that aspect (so no aop.xml-based
concretized
aspect). And in my setting the abstract aspect seems to be excluded from
weaving. Could that cause the problem? And has this behavior changed
really
between the builds I mentioned? I just wanna be sure where the problem
is to
find a good solution for my case... :-)

 Thanks a lot for your help!
 -Martin










Andy.

2008/5/2 Martin Lippert <lippert@xxxxxxx>:


Hi!

 When using load-time weaving with AJDT 1.5.2 I get this exception:

 java.lang.NoSuchFieldError: ajc$cflowCounter$0
 (invoking a woven class)

 I tried to track this down. Seems like this problem was introduced
by
build

1.5.2.200804031532 of AJDT. It worked well with the previous build
1.5.2.200801291327.

 Any idea what is going on?

 Thanks in advance!
 -Martin

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



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





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


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



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

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






Back to the top