java.lang.IncompatibleClassChangeError

Atlassian JIRA | Marek Parfianowicz [Atlassian] | 4 years ago
  1. 0

    *Problem:* Clover instrumentation fails for Groovy 2.x with a stack trace like below: {noformat} BUILD FAILED c:\Work\support\clv-5892-groovyjarjarasm\tutorial\build.xml:32: java.lang.IncompatibleClassChangeError at com.atlassian.clover.instr.groovy.bytecode.RecorderGetterBytecodeInstruction.visit(RecorderGetterBytecodeInstruction.java:109) at org.codehaus.groovy.classgen.AsmClassGenerator.visitBytecodeSequence(AsmClassGenerator.java:1771) at org.codehaus.groovy.classgen.BytecodeSequence.visit(BytecodeSequence.java:64) at org.codehaus.groovy.classgen.asm.StatementWriter.writeBlockStatement(StatementWriter.java:81) at org.codehaus.groovy.classgen.asm.OptimizingStatementWriter.writeBlockStatement(OptimizingStatementWriter.java:155) at org.codehaus.groovy.classgen.AsmClassGenerator.visitBlockStatement(AsmClassGenerator.java:455) at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:69) at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClassCodeContainer(ClassCodeVisitorSupport.java:101) at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitConstructorOrMethod(ClassCodeVisitorSupport.java:112) at org.codehaus.groovy.classgen.AsmClassGenerator.visitStdMethod(AsmClassGenerator.java:319) at org.codehaus.groovy.classgen.AsmClassGenerator.visitConstructorOrMethod(AsmClassGenerator.java:276) at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitMethod(ClassCodeVisitorSupport.java:123) at org.codehaus.groovy.classgen.AsmClassGenerator.visitMethod(AsmClassGenerator.java:396) at org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:1056) at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeVisitorSupport.java:50) at org.codehaus.groovy.classgen.AsmClassGenerator.visitClass(AsmClassGenerator.java:180) at org.codehaus.groovy.control.CompilationUnit$14.call(CompilationUnit.java:786) at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1027) at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:564) at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:542) at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:519) at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:498) at org.codehaus.groovy.tools.FileSystemCompiler.compile(FileSystemCompiler.java:57) at org.codehaus.groovy.tools.FileSystemCompiler.doCompilation(FileSystemCompiler.java:213) at org.codehaus.groovy.ant.Groovyc.runCompiler(Groovyc.java:947) at org.codehaus.groovy.ant.Groovyc.compile(Groovyc.java:994) at org.codehaus.groovy.ant.Groovyc.execute(Groovyc.java:630) {noformat} *Reason:* RecorderGetterBytecodeInstruction extends org.codehaus.groovy.classgen.BytecodeInstruction and implements a following method: public void visit(groovyjarjarasm.asm.MethodVisitor methodVisitor) In Groovy 1.x MethodVisitor is an interface. In Groovy 2.x MethodVisitor is a class. Although RecorderGetterBytecodeInstruction compiles correctly with both Groovy versions, it fails at runtime during bytecode verification, becase visit() method gets different bytecode signature. *Solution:* Compile RecorderGetterBytecodeInstruction against two different Groovy versions. Load proper version using reflections at runtime.

    Atlassian JIRA | 4 years ago | Marek Parfianowicz [Atlassian]
    java.lang.IncompatibleClassChangeError
  2. 0

    *Problem:* Clover instrumentation fails for Groovy 2.x with a stack trace like below: {noformat} BUILD FAILED c:\Work\support\clv-5892-groovyjarjarasm\tutorial\build.xml:32: java.lang.IncompatibleClassChangeError at com.atlassian.clover.instr.groovy.bytecode.RecorderGetterBytecodeInstruction.visit(RecorderGetterBytecodeInstruction.java:109) at org.codehaus.groovy.classgen.AsmClassGenerator.visitBytecodeSequence(AsmClassGenerator.java:1771) at org.codehaus.groovy.classgen.BytecodeSequence.visit(BytecodeSequence.java:64) at org.codehaus.groovy.classgen.asm.StatementWriter.writeBlockStatement(StatementWriter.java:81) at org.codehaus.groovy.classgen.asm.OptimizingStatementWriter.writeBlockStatement(OptimizingStatementWriter.java:155) at org.codehaus.groovy.classgen.AsmClassGenerator.visitBlockStatement(AsmClassGenerator.java:455) at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:69) at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClassCodeContainer(ClassCodeVisitorSupport.java:101) at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitConstructorOrMethod(ClassCodeVisitorSupport.java:112) at org.codehaus.groovy.classgen.AsmClassGenerator.visitStdMethod(AsmClassGenerator.java:319) at org.codehaus.groovy.classgen.AsmClassGenerator.visitConstructorOrMethod(AsmClassGenerator.java:276) at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitMethod(ClassCodeVisitorSupport.java:123) at org.codehaus.groovy.classgen.AsmClassGenerator.visitMethod(AsmClassGenerator.java:396) at org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:1056) at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeVisitorSupport.java:50) at org.codehaus.groovy.classgen.AsmClassGenerator.visitClass(AsmClassGenerator.java:180) at org.codehaus.groovy.control.CompilationUnit$14.call(CompilationUnit.java:786) at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1027) at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:564) at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:542) at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:519) at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:498) at org.codehaus.groovy.tools.FileSystemCompiler.compile(FileSystemCompiler.java:57) at org.codehaus.groovy.tools.FileSystemCompiler.doCompilation(FileSystemCompiler.java:213) at org.codehaus.groovy.ant.Groovyc.runCompiler(Groovyc.java:947) at org.codehaus.groovy.ant.Groovyc.compile(Groovyc.java:994) at org.codehaus.groovy.ant.Groovyc.execute(Groovyc.java:630) {noformat} *Reason:* RecorderGetterBytecodeInstruction extends org.codehaus.groovy.classgen.BytecodeInstruction and implements a following method: public void visit(groovyjarjarasm.asm.MethodVisitor methodVisitor) In Groovy 1.x MethodVisitor is an interface. In Groovy 2.x MethodVisitor is a class. Although RecorderGetterBytecodeInstruction compiles correctly with both Groovy versions, it fails at runtime during bytecode verification, becase visit() method gets different bytecode signature. *Solution:* Compile RecorderGetterBytecodeInstruction against two different Groovy versions. Load proper version using reflections at runtime.

    Atlassian JIRA | 4 years ago | Marek Parfianowicz [Atlassian]
    java.lang.IncompatibleClassChangeError
  3. 0

    java.lang.IncompatibleClassChangeError: Found class groovyjarjarasm.asm.MethodVisitor, but interface was expected

    GitHub | 4 years ago | mjohnsonaz74
    java.lang.IncompatibleClassChangeError: Found class groovyjarjarasm.asm.MethodVisitor, but interface was expected
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    java.lang.IncompatibleClassChangeError on Spring-Tiles integration

    Stack Overflow | 2 years ago
    java.lang.IncompatibleClassChangeError

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IncompatibleClassChangeError

      No message provided

      at com.atlassian.clover.instr.groovy.bytecode.RecorderGetterBytecodeInstruction.visit()
    2. com.atlassian.clover
      RecorderGetterBytecodeInstruction.visit
      1. com.atlassian.clover.instr.groovy.bytecode.RecorderGetterBytecodeInstruction.visit(RecorderGetterBytecodeInstruction.java:109)
      1 frame
    3. Groovy
      Groovyc.execute
      1. org.codehaus.groovy.classgen.AsmClassGenerator.visitBytecodeSequence(AsmClassGenerator.java:1771)
      2. org.codehaus.groovy.classgen.BytecodeSequence.visit(BytecodeSequence.java:64)
      3. org.codehaus.groovy.classgen.asm.StatementWriter.writeBlockStatement(StatementWriter.java:81)
      4. org.codehaus.groovy.classgen.asm.OptimizingStatementWriter.writeBlockStatement(OptimizingStatementWriter.java:155)
      5. org.codehaus.groovy.classgen.AsmClassGenerator.visitBlockStatement(AsmClassGenerator.java:455)
      6. org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:69)
      7. org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClassCodeContainer(ClassCodeVisitorSupport.java:101)
      8. org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitConstructorOrMethod(ClassCodeVisitorSupport.java:112)
      9. org.codehaus.groovy.classgen.AsmClassGenerator.visitStdMethod(AsmClassGenerator.java:319)
      10. org.codehaus.groovy.classgen.AsmClassGenerator.visitConstructorOrMethod(AsmClassGenerator.java:276)
      11. org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitMethod(ClassCodeVisitorSupport.java:123)
      12. org.codehaus.groovy.classgen.AsmClassGenerator.visitMethod(AsmClassGenerator.java:396)
      13. org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:1056)
      14. org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeVisitorSupport.java:50)
      15. org.codehaus.groovy.classgen.AsmClassGenerator.visitClass(AsmClassGenerator.java:180)
      16. org.codehaus.groovy.control.CompilationUnit$14.call(CompilationUnit.java:786)
      17. org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1027)
      18. org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:564)
      19. org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:542)
      20. org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:519)
      21. org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:498)
      22. org.codehaus.groovy.tools.FileSystemCompiler.compile(FileSystemCompiler.java:57)
      23. org.codehaus.groovy.tools.FileSystemCompiler.doCompilation(FileSystemCompiler.java:213)
      24. org.codehaus.groovy.ant.Groovyc.runCompiler(Groovyc.java:947)
      25. org.codehaus.groovy.ant.Groovyc.compile(Groovyc.java:994)
      26. org.codehaus.groovy.ant.Groovyc.execute(Groovyc.java:630)
      26 frames