org.aspectj.apache.bcel.generic.ClassGenException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Not sure if this is Spring, AspectJ or both but...Upgraded to 2.5.6 nightly build 576 and now my project doesn't build. Copied over the new Spring jars (spring.jar, spring-aspects.jar, spring-test.jar and spring-webmvc.jar) along with the bundled AspectJ jars (aspectjrt.jar and aspectjweaver.jar) and two more from the actual AspectJ 1.6.1 release (aspectjlib.jar and aspectjtools.jar). Getting pages and pages of output during build but I think this is the relevant part: [iajc] -- (ClassGenException) Do not attempt to modify the index for this constant instruction: aload_0[42](size1) [iajc] Do not attempt to modify the index for this constant instruction: aload_0[42](size1) [iajc] org.aspectj.apache.bcel.generic.ClassGenException: Do not attempt to modify the index for this constant instruction: aload_0[42](size1) [iajc] at org.aspectj.apache.bcel.generic.InstructionCLV.setIndex(InstructionCLV.java:19) [iajc] at org.aspectj.weaver.bcel.BcelClassWeaver.genInlineInstructions(BcelClassWeaver.java:1949) [iajc] at org.aspectj.weaver.bcel.BcelClassWeaver.inlineMethod(BcelClassWeaver.java:1429) [iajc] at org.aspectj.weaver.bcel.BcelClassWeaver.inlineSelfConstructors(BcelClassWeaver.java:1352) [iajc] at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:502) [iajc] at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:105) [iajc] at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1669) [iajc] at org.aspectj.weaver.bcel.BcelWeaver.weaveWithoutDump(BcelWeaver.java:1620) [iajc] at org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify(BcelWeaver.java:1393) [iajc] at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1213) [iajc] at org.aspectj.ajdt.internal.compiler.AjPipeliningCompilerAdapter.weaveQueuedEntries(AjPipeliningCompilerAdapter.java:454) [iajc] at org.aspectj.ajdt.internal.compiler.AjPipeliningCompilerAdapter.queueForWeaving(AjPipeliningCompilerAdapter.java:391) [iajc] at org.aspectj.ajdt.internal.compiler.AjPipeliningCompilerAdapter.afterProcessing(AjPipeliningCompilerAdapter.java:379) [iajc] at org.aspectj.ajdt.internal.compiler.CompilerAdapter.ajc$after$org_aspectj_ajdt_internal_compiler_CompilerAdapter$5$6b855184(CompilerAdapter.aj:98) [iajc] at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:641) [iajc] at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:392) [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performCompilation(AjBuildManager.java:995) [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:269) [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:184) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60) [iajc] at org.aspectj.tools.ajc.Main.run(Main.java:382) [iajc] at org.aspectj.tools.ajc.Main.runMain(Main.java:254) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.executeInSameVM(AjcTask.java:1307) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.execute(AjcTask.java:1105) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) [iajc] at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source) [iajc] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [iajc] at java.lang.reflect.Method.invoke(Method.java:597) [iajc] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105) [iajc] at org.apache.tools.ant.Task.perform(Task.java:348) [iajc] at org.apache.tools.ant.Target.execute(Target.java:357) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:385) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329) [iajc] at org.apache.tools.ant.Project.executeTarget(Project.java:1298) [iajc] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1181) [iajc] at org.apache.tools.ant.Main.runBuild(Main.java:698) [iajc] at org.apache.tools.ant.Main.startAnt(Main.java:199) [iajc] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257) [iajc] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
    via by Tom Duffey,
  • Not sure if this is Spring, AspectJ or both but...Upgraded to 2.5.6 nightly build 576 and now my project doesn't build. Copied over the new Spring jars (spring.jar, spring-aspects.jar, spring-test.jar and spring-webmvc.jar) along with the bundled AspectJ jars (aspectjrt.jar and aspectjweaver.jar) and two more from the actual AspectJ 1.6.1 release (aspectjlib.jar and aspectjtools.jar). Getting pages and pages of output during build but I think this is the relevant part: [iajc] -- (ClassGenException) Do not attempt to modify the index for this constant instruction: aload_0[42](size1) [iajc] Do not attempt to modify the index for this constant instruction: aload_0[42](size1) [iajc] org.aspectj.apache.bcel.generic.ClassGenException: Do not attempt to modify the index for this constant instruction: aload_0[42](size1) [iajc] at org.aspectj.apache.bcel.generic.InstructionCLV.setIndex(InstructionCLV.java:19) [iajc] at org.aspectj.weaver.bcel.BcelClassWeaver.genInlineInstructions(BcelClassWeaver.java:1949) [iajc] at org.aspectj.weaver.bcel.BcelClassWeaver.inlineMethod(BcelClassWeaver.java:1429) [iajc] at org.aspectj.weaver.bcel.BcelClassWeaver.inlineSelfConstructors(BcelClassWeaver.java:1352) [iajc] at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:502) [iajc] at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:105) [iajc] at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1669) [iajc] at org.aspectj.weaver.bcel.BcelWeaver.weaveWithoutDump(BcelWeaver.java:1620) [iajc] at org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify(BcelWeaver.java:1393) [iajc] at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1213) [iajc] at org.aspectj.ajdt.internal.compiler.AjPipeliningCompilerAdapter.weaveQueuedEntries(AjPipeliningCompilerAdapter.java:454) [iajc] at org.aspectj.ajdt.internal.compiler.AjPipeliningCompilerAdapter.queueForWeaving(AjPipeliningCompilerAdapter.java:391) [iajc] at org.aspectj.ajdt.internal.compiler.AjPipeliningCompilerAdapter.afterProcessing(AjPipeliningCompilerAdapter.java:379) [iajc] at org.aspectj.ajdt.internal.compiler.CompilerAdapter.ajc$after$org_aspectj_ajdt_internal_compiler_CompilerAdapter$5$6b855184(CompilerAdapter.aj:98) [iajc] at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:641) [iajc] at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:392) [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performCompilation(AjBuildManager.java:995) [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:269) [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:184) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60) [iajc] at org.aspectj.tools.ajc.Main.run(Main.java:382) [iajc] at org.aspectj.tools.ajc.Main.runMain(Main.java:254) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.executeInSameVM(AjcTask.java:1307) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.execute(AjcTask.java:1105) [iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) [iajc] at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source) [iajc] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [iajc] at java.lang.reflect.Method.invoke(Method.java:597) [iajc] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105) [iajc] at org.apache.tools.ant.Task.perform(Task.java:348) [iajc] at org.apache.tools.ant.Target.execute(Target.java:357) [iajc] at org.apache.tools.ant.Target.performTasks(Target.java:385) [iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329) [iajc] at org.apache.tools.ant.Project.executeTarget(Project.java:1298) [iajc] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) [iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1181) [iajc] at org.apache.tools.ant.Main.runBuild(Main.java:698) [iajc] at org.apache.tools.ant.Main.startAnt(Main.java:199) [iajc] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257) [iajc] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
    via by Tom Duffey,
    • org.aspectj.apache.bcel.generic.ClassGenException: Do not attempt to modify the index for this constant instruction: aload_0[42](size1) at org.aspectj.apache.bcel.generic.InstructionCLV.setIndex(InstructionCLV.java:19) at org.aspectj.weaver.bcel.BcelClassWeaver.genInlineInstructions(BcelClassWeaver.java:1949) at org.aspectj.weaver.bcel.BcelClassWeaver.inlineMethod(BcelClassWeaver.java:1429) at org.aspectj.weaver.bcel.BcelClassWeaver.inlineSelfConstructors(BcelClassWeaver.java:1352) at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:502) at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:105) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1669) at org.aspectj.weaver.bcel.BcelWeaver.weaveWithoutDump(BcelWeaver.java:1620) at org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify(BcelWeaver.java:1393) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1213) at org.aspectj.ajdt.internal.compiler.AjPipeliningCompilerAdapter.weaveQueuedEntries(AjPipeliningCompilerAdapter.java:454) at org.aspectj.ajdt.internal.compiler.AjPipeliningCompilerAdapter.queueForWeaving(AjPipeliningCompilerAdapter.java:391) at org.aspectj.ajdt.internal.compiler.AjPipeliningCompilerAdapter.afterProcessing(AjPipeliningCompilerAdapter.java:379) at org.aspectj.ajdt.internal.compiler.CompilerAdapter.ajc$after$org_aspectj_ajdt_internal_compiler_CompilerAdapter$5$6b855184(CompilerAdapter.aj:98) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:641) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:392) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performCompilation(AjBuildManager.java:995) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:269) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:184) 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:382) at org.aspectj.tools.ajc.Main.runMain(Main.java:254) at org.aspectj.tools.ant.taskdefs.AjcTask.executeInSameVM(AjcTask.java:1307) at org.aspectj.tools.ant.taskdefs.AjcTask.execute(AjcTask.java:1105) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:357) at org.apache.tools.ant.Target.performTasks(Target.java:385) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329) at org.apache.tools.ant.Project.executeTarget(Project.java:1298) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.apache.tools.ant.Project.executeTargets(Project.java:1181) at org.apache.tools.ant.Main.runBuild(Main.java:698) at org.apache.tools.ant.Main.startAnt(Main.java:199) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
    No Bugmate found.