Announcement Announcement Module
Collapse
No announcement yet.
[Urgent] - Bad version numner found in AspectJ 1.7.0 (m2eclipse issue?) Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • [Urgent] - Bad version numner found in AspectJ 1.7.0 (m2eclipse issue?)

    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 (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.

    Code:
    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.loadtime.ClassLoaderWeavingAdaptor.initialize(ClassLoaderWeavingAdaptor.java:125)
    My dependencies are as follows:

    Code:
    		<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

  • #2
    Are you sure that your project has a maven nature? I think you created this project without maven initially and then manually created the necessary directory structure for maven. Can you confirm?

    Comment

    Working...
    X