[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-users] Bad Weaver Kind

Title: Bad Weaver Kind

Hi David,

 

I’ve seen this kind of error in past from using code compiled by AspectJ builds from before 1.5.0. I would check the date/version of the AspectJ tools you are using to compile and the AspectJ weaver you are using (e.g., by adding -Daj.weaving.verbose=true).

 


From: aspectj-users-bounces@xxxxxxxxxxx [mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of David Hatton (AT/LMI)
Sent: Thursday, October 26, 2006 2:04 AM
To: aspectj-users@xxxxxxxxxxx
Subject: [aspectj-users] Bad Weaver Kind

 

Hi,

Any ideas what this error is???

My aspect which produces it is attached … I've whittled the pointcut down to the most basic and it is still giving me this error.

/Dave

 

Thu Oct 26 10:01:22 BST 2006
ABORT
       
Exception thrown from AspectJ DEVELOPMENT

This might be logged as a bug already -- find current bugs at
  http://bugs.eclipse.org/bugs/buglist.cgi?product=AspectJ&component=Compiler

Bugs for exceptions thrown have titles File:line from the top stack,
e.g., "SomeFile.java:243"

If you don't find the exception below in a bug, please add a new bug
at http://bugs.eclipse.org/bugs/enter_bug.cgi?product=AspectJ
To make the bug a priority, please include a test program
that can reproduce this exception.
bad WeaverState.Kind: -115

when batch building BuildConfig[null] #Files=1
bad WeaverState.Kind: -115
java.lang.RuntimeException: bad WeaverState.Kind: -115
        at org.aspectj.weaver.WeaverStateInfo.read(WeaverStateInfo.java:142)
        at org.aspectj.weaver.AjAttribute.read(AjAttribute.java:97)
        at org.aspectj.weaver.bcel.BcelAttributes.readAjAttributes(BcelAttributes.java:66)
        at org.aspectj.weaver.bcel.BcelObjectType.ensureAspectJAttributesUnpacked(BcelObjectType.java:312)
        at org.aspectj.weaver.bcel.BcelObjectType.<init>(BcelObjectType.java:142)
        at org.aspectj.weaver.bcel.BcelWorld.buildBcelDelegate(BcelWorld.java:342)
        at org.aspectj.weaver.bcel.BcelWorld.addSourceObjectType(BcelWorld.java:400)
        at org.aspectj.weaver.bcel.BcelWeaver.addClassFile(BcelWeaver.java:414)
        at org.aspectj.weaver.bcel.BcelWeaver.addClassFile(BcelWeaver.java:429)
        at org.aspectj.ajdt.internal.core.builder.AjBuildManager.initBcelWorld(AjBuildManager.java:755)
        at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:239)
        at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:176)
        at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112)
        at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60)
        at org.aspectj.tools.ajc.Main.run(Main.java:378)
        at org.aspectj.tools.ajc.Main.runMain(Main.java:253)
        at org.aspectj.tools.ant.taskdefs.AjcTask.executeInSameVM(AjcTask.java:1282)
        at org.aspectj.tools.ant.taskdefs.AjcTask.execute(AjcTask.java:1080)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at org.apache.tools.ant.Target.execute(Target.java:341)
        at org.apache.tools.ant.Target.performTasks(Target.java:369)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
        at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
        at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
        at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)

 

---------------------------------

 

package com.ericsson.nms.cif.cs.aspect;

import com.ericsson.nms.cif.cs.logger.CsLogger;
import com.ericsson.nms.cif.cs.logger.IsTraceable;
import static com.ericsson.nms.cif.cs.logger.CsLogger.*;

public aspect TraceAspect {

    // Public API Methods
    pointcut bcMethods() :
        execution (*.*(..));
   
    before() : bcMethods() {
        if (CsLogger.isTraceLevelActive(CsGroup.API, LogLevel.DETAILED)) {
            CsLogger.enterbc(
                thisJoinPointStaticPart.getSignature().getDeclaringTypeName(),
                thisJoinPointStaticPart.getSignature().getName(),
                thisJoinPoint.getArgs());
        } else if (CsLogger.isTraceLevelActive(CsGroup.API, LogLevel.INFO)) {
            CsLogger.enterbc(
                thisJoinPointStaticPart.getSignature().getDeclaringTypeName(),
                thisJoinPointStaticPart.getSignature().getName(),
                "NOT TRACED");          
        }
    }

    after() returning : bcMethods() {
        if (CsLogger.isTraceLevelActive(CsGroup.API, LogLevel.INFO)) {
            CsLogger.exit(
                    CsGroup.API,
                    thisJoinPointStaticPart.getSignature().getDeclaringTypeName(),
                    thisJoinPointStaticPart.getSignature().getName());          
        }
    }

}