Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AspectJ » [Urgent] - Bad version numner found in AspectJ 1.7.0 (m2eclipse issue?) ( [Urgent] - Bad version numner found in AspectJ 1.7.0 (m2eclipse issue?) )
icon8.gif   [Urgent] - Bad version numner found in AspectJ 1.7.0 (m2eclipse issue?) [message #988918] Mon, 03 December 2012 17:18 Go to next message
Matt Madhavan is currently offline Matt MadhavanFriend
Messages: 2
Registered: November 2012
Junior Member
Hello,
I am stuck on this issue for a while now. It used to work fine for a while and had to re-install IBM RAD 8.0.2 (eclipse 3.6) and and this problem started showing up. This happens when I run the test using JUnit and and not when I run to from maven.

I am using spring agent to weave my concrete aspects defined via aop.xml. The abstract aspect is a profile aspect with an abstract point cut.


Unable to continue, this version of AspectJ supports classes built with weaver version 3.0 but the class org.springframework.beans.factory.aspectj.AnnotationBeanConfigurerAspect is version 6.0

org.aspectj.weaver.BCException: Unable to continue, this version of AspectJ supports classes built with weaver version 3.0 but the class org.springframework.beans.factory.aspectj.AnnotationBeanConfigurerAspect is version 6.0

	at org.aspectj.weaver.bcel.BcelAttributes.readAjAttributes(BcelAttributes.java:53)
	at org.aspectj.weaver.bcel.BcelObjectType.ensureAspectJAttributesUnpacked(BcelObjectType.java:303)
	at org.aspectj.weaver.bcel.BcelObjectType.<init>(BcelObjectType.java:144)
	at org.aspectj.weaver.bcel.BcelWorld.buildBcelDelegate(BcelWorld.java:337)
	at org.aspectj.weaver.bcel.BcelWorld.resolveDelegate(BcelWorld.java:320)
	at org.aspectj.weaver.ltw.LTWWorld.resolveDelegate(LTWWorld.java:90)
	at org.aspectj.weaver.World.resolveToReferenceType(World.java:349)
	at org.aspectj.weaver.World.resolve(World.java:265)
	at org.aspectj.weaver.bcel.BcelWeaver.addLibraryAspect(BcelWeaver.java:155)
	at org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor.registerAspects(ClassLoaderWeavingAdaptor.java:336)
	at org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor.registerDefinitions(ClassLoaderWeavingAdaptor.java:189)
	at org.aspectj.weaver.loadt
ime.ClassLoaderWeavingAdaptor.initialize(ClassLoaderWeavingAdaptor.java:125)
}

My dependencies are as follows:

		<dependency>
			<groupId>org.aspectj</groupId>
			<artifactId>aspectjtools</artifactId>
			<version>1.7.0</version>
		</dependency>
		<dependency>
			<groupId>org.aspectj</groupId>
			<artifactId>aspectjrt</artifactId>
			<version>1.7.0</version>
		</dependency>
		<dependency>
			<groupId>org.aspectj</groupId>
			<artifactId>aspectjweaver</artifactId>
			<version>1.7.0</version>
		</dependency>


Looks like some where in my classpath an old version of aspectj weaver is picked up. I believe it has to be m2eclipse issue since when I run the same test either maven in command line or maven within eclipse I face no problem.

It happens only when I rt click and run Junit test.

Any ideas please?

Thanks in advance!

Matt G. Madhavan
Re: [Urgent] - Bad version numner found in AspectJ 1.7.0 (m2eclipse issue?) [message #988959 is a reply to message #988918] Tue, 04 December 2012 05:11 Go to previous messageGo to next message
Andrew Eisenberg is currently offline Andrew EisenbergFriend
Messages: 382
Registered: July 2009
Senior Member
No. The problem is that you are using AspectJ 1.7 in maven, but in RAD, you are using AspectJ 1.6. In 1.7, the byte code version had to be bumped, so class files generated by 1.7 will not be able to run against 1.6. Or, there is some variation of this. Looking more carefully at your error message, you are using AnnotationBeanConfigurerAspect, compiled using 1.6 but trying to weaving into 1.7. This doesn't work.

Solution 1: move your pom to AspectJ 1.6.x.

Solution 2: Upgrade to AJDT 2.2.0 or later. This would require moving to an Eclipse 3.7 or (preferably) 4.2-based RAD.
Re: [Urgent] - Bad version numner found in AspectJ 1.7.0 (m2eclipse issue?) [message #989118 is a reply to message #988959] Tue, 04 December 2012 16:51 Go to previous messageGo to next message
Matt Madhavan is currently offline Matt MadhavanFriend
Messages: 2
Registered: November 2012
Junior Member
Hello Andrew,
My maven dependencies and hence my classpath has only aspectj 1.7. Please note that that when I run my test as JUnit test the classpath has to be based on maven classpth.

For some reason elipse's (RAD's) classpath seems to override the intended classpath. I even un-installed the AJDT from RAD. I have no idea where this issue comes from.

Looks like others have faced this issue in the past. It does not happen when I run the same test in Soring STS.

Some where RAD (eclispe 3.6) is overriding my classpath for AspectJ.

Any ideas please? Been stuck on this for a week!

Thanks in advace.

Matt
Re: [Urgent] - Bad version numner found in AspectJ 1.7.0 (m2eclipse issue?) [message #989136 is a reply to message #989118] Tue, 04 December 2012 18:05 Go to previous message
Andrew Eisenberg is currently offline Andrew EisenbergFriend
Messages: 382
Registered: July 2009
Senior Member
As I said, you cannot make this work in Eclipse 3.6. You must either upgrade to a later Eclipse (or RAD or STS that is based on 3.7 or later). Or you must revert back to AspectJ 1.6.
Previous Topic:eclipse indigo is not starting up after installing gwt
Next Topic:How to Empty the Cache of Equinox Weaving
Goto Forum:
  


Current Time: Sat Apr 20 06:16:48 GMT 2024

Powered by FUDForum. Page generated in 0.03670 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top