Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-users] Bug in latest AJDT?

Hi

It turned out that the weaver that I was using (from 1.6.) with the following signature: AspectJ Weaver Version DEVELOPMENT built on Wednesday Jan 23, 2008 at 01:03:57 GMT was not handling it. When I switched to the aspectjweaver.jar in the eclipse plugin distro it ran fine.

Hermod


-----Original Message-----
From: aspectj-users-bounces@xxxxxxxxxxx [mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of hermod.opstvedt@xxxxxxxxx
Sent: Thursday, March 06, 2008 7:06 AM
To: aspectj-users@xxxxxxxxxxx
Subject: RE: [aspectj-users] Bug in latest AJDT?


Hi

I think that you might have hit the nail on org.aspectj.ext.ltw13.ClassPreProcessorAdapter - This is to enable ltw on JDK14.4 and JDK 1.3. I'll do a rebuild of everything and see what happens.

Hermod

-----Original Message-----
From: aspectj-users-bounces@xxxxxxxxxxx [mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Andy Clement
Sent: Thursday, March 06, 2008 6:20 AM
To: hermod@xxxxxxxxxxxx; aspectj-users@xxxxxxxxxxx
Subject: Re: [aspectj-users] Bug in latest AJDT?


On 05/03/2008, Hermod Opstvedt <hermod@xxxxxxxxxxxx> wrote:
> Hi
>
>  Actually it's the other way around if you look at what it is saying.

The message perhaps isn't entirely clear, I'll agree - but the problem is exactly what I am saying.... Let me interpret, see the extra information in brackets:

register definition failed org.aspectj.weaver.BCException: Unable to continue, this version of AspectJ (ie. the version of aspectjweaver.jar you are using to do loadtime weaving) supports classes built with weaver version 3.0 but the class xxx....BaseAspect is version 5.0 (built with a more recent version of aspectj, ie. AspectJ1.6.0m2)

It is saying that the .class files produced by AJDT using AspectJ1.6.0m2 include extra information in the serialized attributes.  If you give these class files to an old weaver, it doesn't know how to deserialize the extra information and so cannot make sense of it. Rather than crashing on deserializing, we have a version number in there and I bump the version each time the serialized form changes.  I bumped it to 4.0 in dev builds just after AspectJ1.6.0m1 came out and then again to 5.0 when AspectJ1.6.0m2 came out.  In fact AspectJ has been producing version 3.0 from AspectJ 1.5.0 to AspectJ1.5.4 - I try not to change the serialized form unless necessary.

>  The weaver weaves 5.0, but the runtime is 3.0.

The compiler/weaver is an AspectJ1.6.0m2 and the aspectjweaver.jar you are using for loadtime weaving execution is AspectJ1.5.0 > AspectJ1.5.4.  The runtime is not a problem here.


> This again is controlled by the ASPECTJ_RT parameter in the Eclipse
> plugin. I'll try to > remove the feature,  make sure the  ASPECTJ_RT 
> parameter is also deleted and reinstall the plugin  again. If it still 
> gives this error, it definitly is an error in the plugin.

This is not controlled by the aspect_rt setting, that is for the runtime jar - and we are painstakingly careful that we don't cause compatibility problems with that across versions.  The weaver is in the aspectjweaver.jar - what is perhaps happening is that the ltw launch configuration you are using to launch the application is still pointing to an old AspectJ1.5.4 aspectjweaver.jar - can you check the configuration?  Or define a fresh launch configuration that uses -javaagent and points to the most recent weaver jar?

Actually, from your original message, I don't know what 'org.aspectj.ext.ltw13.ClassPreProcessorAdapter' is - but I suspect it is delegating to an old weaver (1.5.0 > 1.5.4) rather than the most recent one that is installed in the Eclipse environment (org.aspectj.weaver plugin) - could that be the case?

cheers,
Andy

>
>  -----Opprinnelig melding-----
>  Fra: aspectj-users-bounces@xxxxxxxxxxx
> [mailto:aspectj-users-bounces@xxxxxxxxxxx] På vegne av Andy Clement
>  Sendt: 5. mars 2008 21:51
>  Til: aspectj-users@xxxxxxxxxxx
>  Emne: Re: [aspectj-users] Bug in latest AJDT?
>
>
>  looks like you are using an old weaver with an up to date compiler.
>
>  AspectJ1.6.0m2 generates files of version 5.0
>  AspectJ1.5.4 can only read up to version 3.0
>
>  Version 5 includes the extra information about parameter annotation 
> matching  and annotation value matching (it goes in the file whether 
> you are using  that feature or not - but doesn't take up much space).
>
>  If you are using the latest AJDT you will also need up upgrade your 
> weaver.
>
>  Andy.
>
>  On 05/03/2008, hermod.opstvedt@xxxxxxxxx <hermod.opstvedt@xxxxxxxxx> 
> wrote:  >  >
>  >
>  > Hi
>  >
>  > When I try to run an AspectJ/Java application under Eclipse with the
>  > latest ajdt bul I get:
>  >
>  > AspectWerkz - INFO - Pre-processor
>  > org.aspectj.ext.ltw13.ClassPreProcessorAdapter loaded and initialized
>  > 14:37:23.713 main E register definition failed
>  > org.aspectj.weaver.BCException: Unable to continue, this version of
>  > AspectJ supports classes built with weaver version 3.0 but the class
>  > xxx....BaseAspect is version 5.0
>  >
>  > [AppClassLoader@317d384e] warning register definition failed --
>  > (BCException) Unable to continue, this version of AspectJ supports
>  > classes built with weaver version 3.0 but the class xxx....BaseAspect
>  > is version 5.0
>  >
>  > Unable to continue, this version of AspectJ supports classes built
>  > with weaver version 3.0 but the class xxx....BaseAspect is version 5.0
>  >
>  > org.aspectj.weaver.BCException: Unable to continue, this version of
>  > AspectJ supports classes built with weaver version 3.0 but the class
>  > xxx....BaseAspect is version 5.0
>  >
>  > Any other seen this bevaiour and know how to fix it.
>  >
>  > Hermod * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
>  > * * *
>  > * * *
>  >
>  > This email with attachments is solely for the use of the individual or
>  > entity to whom it is addressed. Please also be aware that the DnB NOR
>  > Group cannot accept any payment orders or other legally binding
>  > correspondence with customers as a part of an email.
>  >
>  > This email message has been virus checked by the anti virus programs
>  > used in the DnB NOR Group.
>  >
>  > * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
>  > * * *
>  >
>  >
>  > _______________________________________________
>  >  aspectj-users mailing list
>  >  aspectj-users@xxxxxxxxxxx
>  > https://dev.eclipse.org/mailman/listinfo/aspectj-users
>  >
>  >
>  _______________________________________________
>  aspectj-users mailing list
>  aspectj-users@xxxxxxxxxxx
>  https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
>
>  _______________________________________________
>  aspectj-users mailing list
>  aspectj-users@xxxxxxxxxxx  
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/aspectj-users
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

This email with attachments is solely for the use of the individual or
entity to whom it is addressed. Please also be aware that the DnB NOR Group
cannot accept any payment orders or other legally binding correspondence with
customers as a part of an email. 

This email message has been virus checked by the anti virus programs used
in the DnB NOR Group.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

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

This email with attachments is solely for the use of the individual or
entity to whom it is addressed. Please also be aware that the DnB NOR Group
cannot accept any payment orders or other legally binding correspondence with
customers as a part of an email. 

This email message has been virus checked by the anti virus programs used
in the DnB NOR Group.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *



Back to the top