Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-dev] A weaving problem?

Thank you very much! It's right!
 
I change the pointcut : cflow(call(* java..*.*(..))) 
with:  cflow(call(* java..*.*(...)) && !within(AOPHiddenMetrics..*) )
it works!!
Thanks for your help.
 
Mattia
----- Messaggio originale -----
Da: Thiago Bartolomei <thiagobart@xxxxxxxxx>
A: AspectJ developer discussions <aspectj-dev@xxxxxxxxxxx>
Inviato: Martedì 26 febbraio 2008, 19:55:15
Oggetto: Re: [aspectj-dev] A weaving problem?

Hi,

maybe it is the following problem.

First, the CaesarJ compiler uses the AspectJ Weaver version 1.2.1. So it first generates bytecode and annotates it with some ajc specific stuff and then call the weaver on it.

Second, when you use this execution pointcut you will only match methods inside the java runtime library (because of your regular _expression_). Since there is no annotations there, this is no problem. But when you use the call pointcut, you will match things inside many libraries that call java.*..., including AOPHiddenMetrics. Now, because AOPHiddenMetrics probably already has some annotations from ajc (from a newer version of ajc I must say), then when CaesarJ calls the weaver 1.2.1, it gets confused by those annotations.

Does it make sense?

Bests,
Thiago T. Bartolomei


On Tue, Feb 26, 2008 at 11:41 AM, Andy Clement <andrew.clement@xxxxxxxxx> wrote:
This error:

bad WeaverState.Kind: 67

indicates a mismatch between the aspectj level that was used to build
something and the aspectj level that is being used to weave it.
Usually it is because a newer version of aspectj was used to build the
code than was used to weave it.  For example, if I compiled it with
1.6.0 then wove it with the 1.5.0 weaver, I would see something like
that.  AspectJ is always compatible moving forwards (the 1.6.0 weaver
understands 1.5.0 built code) but not vice versa.

If you have imported it as a jar file - do you know what level of the
compiler was used to build it before you imported it?


Andy.

On 26/02/2008, Mattia <mattiar82@xxxxxxxxx> wrote:
>
> Dear All,
>
> I'm working on a CaesarJ project by using the corresponding eclipse plugin.
> My project depends on an AspectJ project, named AOPHiddenMetrics that I
> import as a JAR file.
>
> When I try to compile it I got the following error:
>
> Internal compiler error: java.lang.RuntimeException: bad WeaverState.Kind:
> 67
>
> That sounds weird to me especially when cutting down my example I've
> discovered that it complains of this kind of pointcuts:
>
>                       cflow(call(* java..*.*(..))
>
> The weirdness is due to the fact that if I change the call pointcut into
> an execution pointcut everything perfectly compiles (of course semantics
> change).
>
> Do you have any ideas about how to solve this problem?
>
> Thanks in advance for your help
>
> Mattia
>
>  ________________________________
> ________________________________
> L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail
> _______________________________________________
>  aspectj-dev mailing list
>  aspectj-dev@xxxxxxxxxxx
>  https://dev.eclipse.org/mailman/listinfo/aspectj-dev
>
>
_______________________________________________
aspectj-dev mailing list
aspectj-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-dev



-----Segue allegato-----

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




L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail

Back to the top