java.lang.NoSuchMethodError: org.codehaus.groovy.ast.stmt.TryCatchStatement.setFinallyStatement(Lorg/codehaus/groovy/ast /stmt/Statement;)V

Atlassian JIRA | Alex McManus | 7 years ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    I get a fatal java.lang.NoSuchMethodError error when trying to instrument my Groovy code, running a multi-module build with Maven 2. I've tried this with 3.0.0-m3 and 3.0.0-m4r3. The command line is: {code} mvn clover2:setup test clover2:aggregate clover2:clover {code} The error details: {code} [INFO] ------------------------------------------------------------------------ [ERROR] FATAL ERROR [INFO] ------------------------------------------------------------------------ [INFO] org.codehaus.groovy.ast.stmt.TryCatchStatement.setFinallyStatement(Lorg/codehaus/groovy/ast/stmt/Statement;)V [INFO] ------------------------------------------------------------------------ [INFO] Trace java.lang.NoSuchMethodError: org.codehaus.groovy.ast.stmt.TryCatchStatement.setFinallyStatement(Lorg/codehaus/groovy/ast /stmt/Statement;)V at com.atlassian.clover.instr.groovy.InstrumentingCodeVisitor.visitTryCatchFinally(InstrumentingCodeVisitor.java :813) at org.codehaus.groovy.ast.stmt.TryCatchStatement.visit(TryCatchStatement.java:42) at org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement(CodeVisitorSupport.java:38) at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitBlockStatement(ClassCodeVisitorSupport.java:129) at com.atlassian.clover.instr.groovy.InstrumentingCodeVisitor.visitBlockStatement(InstrumentingCodeVisitor.java: 834) at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:52) at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClassCodeContainer(ClassCodeVisitorSupport.java:73) at com.atlassian.clover.instr.groovy.InstrumentingCodeVisitor.visitConstructorOrMethod(InstrumentingCodeVisitor. java:242) at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitMethod(ClassCodeVisitorSupport.java:88) at org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:965) at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeVisitorSupport.java:48) at com.atlassian.clover.instr.groovy.InstrumentingCodeVisitor.visitClass(InstrumentingCodeVisitor.java:220) at com.atlassian.clover.instr.groovy.Grover.visit(Grover.java:215) at com.atlassian.clover.instr.groovy.Grover.visit(Grover.java:119) at org.codehaus.groovy.transform.ASTTransformationVisitor$3.call(ASTTransformationVisitor.java:268) at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:801) at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:466) at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:445) at org.codehaus.groovy.maven.runtime.v1_6.ClassCompilerFeature$ClassCompilerImpl.compile(ClassCompilerFeature.ja va:158) at org.codehaus.groovy.maven.plugin.compile.AbstractCompileMojo.compile(AbstractCompileMojo.java:200) at org.codehaus.groovy.maven.plugin.compile.AbstractCompileMojo.process(AbstractCompileMojo.java:164) at org.codehaus.groovy.maven.plugin.ComponentMojoSupport.doExecute(ComponentMojoSupport.java:60) at org.codehaus.groovy.maven.plugin.MojoSupport.execute(MojoSupport.java:69) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:453) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:50 0) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:479) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.jav a:331) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:292) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129) at org.apache.maven.cli.MavenCli.main(MavenCli.java:301) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) {code}

    Atlassian JIRA | 7 years ago | Alex McManus
    java.lang.NoSuchMethodError: org.codehaus.groovy.ast.stmt.TryCatchStatement.setFinallyStatement(Lorg/codehaus/groovy/ast /stmt/Statement;)V
  2. 0

    I get a fatal java.lang.NoSuchMethodError error when trying to instrument my Groovy code, running a multi-module build with Maven 2. I've tried this with 3.0.0-m3 and 3.0.0-m4r3. The command line is: {code} mvn clover2:setup test clover2:aggregate clover2:clover {code} The error details: {code} [INFO] ------------------------------------------------------------------------ [ERROR] FATAL ERROR [INFO] ------------------------------------------------------------------------ [INFO] org.codehaus.groovy.ast.stmt.TryCatchStatement.setFinallyStatement(Lorg/codehaus/groovy/ast/stmt/Statement;)V [INFO] ------------------------------------------------------------------------ [INFO] Trace java.lang.NoSuchMethodError: org.codehaus.groovy.ast.stmt.TryCatchStatement.setFinallyStatement(Lorg/codehaus/groovy/ast /stmt/Statement;)V at com.atlassian.clover.instr.groovy.InstrumentingCodeVisitor.visitTryCatchFinally(InstrumentingCodeVisitor.java :813) at org.codehaus.groovy.ast.stmt.TryCatchStatement.visit(TryCatchStatement.java:42) at org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement(CodeVisitorSupport.java:38) at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitBlockStatement(ClassCodeVisitorSupport.java:129) at com.atlassian.clover.instr.groovy.InstrumentingCodeVisitor.visitBlockStatement(InstrumentingCodeVisitor.java: 834) at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:52) at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClassCodeContainer(ClassCodeVisitorSupport.java:73) at com.atlassian.clover.instr.groovy.InstrumentingCodeVisitor.visitConstructorOrMethod(InstrumentingCodeVisitor. java:242) at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitMethod(ClassCodeVisitorSupport.java:88) at org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:965) at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeVisitorSupport.java:48) at com.atlassian.clover.instr.groovy.InstrumentingCodeVisitor.visitClass(InstrumentingCodeVisitor.java:220) at com.atlassian.clover.instr.groovy.Grover.visit(Grover.java:215) at com.atlassian.clover.instr.groovy.Grover.visit(Grover.java:119) at org.codehaus.groovy.transform.ASTTransformationVisitor$3.call(ASTTransformationVisitor.java:268) at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:801) at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:466) at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:445) at org.codehaus.groovy.maven.runtime.v1_6.ClassCompilerFeature$ClassCompilerImpl.compile(ClassCompilerFeature.ja va:158) at org.codehaus.groovy.maven.plugin.compile.AbstractCompileMojo.compile(AbstractCompileMojo.java:200) at org.codehaus.groovy.maven.plugin.compile.AbstractCompileMojo.process(AbstractCompileMojo.java:164) at org.codehaus.groovy.maven.plugin.ComponentMojoSupport.doExecute(ComponentMojoSupport.java:60) at org.codehaus.groovy.maven.plugin.MojoSupport.execute(MojoSupport.java:69) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:453) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:50 0) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:479) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.jav a:331) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:292) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129) at org.apache.maven.cli.MavenCli.main(MavenCli.java:301) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) {code}

    Atlassian JIRA | 7 years ago | Alex McManus
    java.lang.NoSuchMethodError: org.codehaus.groovy.ast.stmt.TryCatchStatement.setFinallyStatement(Lorg/codehaus/groovy/ast /stmt/Statement;)V

    Root Cause Analysis

    1. java.lang.NoSuchMethodError

      org.codehaus.groovy.ast.stmt.TryCatchStatement.setFinallyStatement(Lorg/codehaus/groovy/ast /stmt/Statement;)V

      at com.atlassian.clover.instr.groovy.InstrumentingCodeVisitor.visitTryCatchFinally()
    2. com.atlassian.clover
      InstrumentingCodeVisitor.visitTryCatchFinally
      1. com.atlassian.clover.instr.groovy.InstrumentingCodeVisitor.visitTryCatchFinally(InstrumentingCodeVisitor.java:813)
      1 frame
    3. Groovy
      ClassCodeVisitorSupport.visitBlockStatement
      1. org.codehaus.groovy.ast.stmt.TryCatchStatement.visit(TryCatchStatement.java:42)
      2. org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement(CodeVisitorSupport.java:38)
      3. org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitBlockStatement(ClassCodeVisitorSupport.java:129)
      3 frames
    4. com.atlassian.clover
      InstrumentingCodeVisitor.visitBlockStatement
      1. com.atlassian.clover.instr.groovy.InstrumentingCodeVisitor.visitBlockStatement(InstrumentingCodeVisitor.java:834)
      1 frame
    5. Groovy
      ClassCodeVisitorSupport.visitClassCodeContainer
      1. org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:52)
      2. org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClassCodeContainer(ClassCodeVisitorSupport.java:73)
      2 frames
    6. com.atlassian.clover
      InstrumentingCodeVisitor.visitConstructorOrMethod
      1. com.atlassian.clover.instr.groovy.InstrumentingCodeVisitor.visitConstructorOrMethod(InstrumentingCodeVisitor.java:242)
      1 frame
    7. Groovy
      ClassCodeVisitorSupport.visitClass
      1. org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitMethod(ClassCodeVisitorSupport.java:88)
      2. org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:965)
      3. org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeVisitorSupport.java:48)
      3 frames
    8. com.atlassian.clover
      Grover.visit
      1. com.atlassian.clover.instr.groovy.InstrumentingCodeVisitor.visitClass(InstrumentingCodeVisitor.java:220)
      2. com.atlassian.clover.instr.groovy.Grover.visit(Grover.java:215)
      3. com.atlassian.clover.instr.groovy.Grover.visit(Grover.java:119)
      3 frames
    9. Groovy
      CompilationUnit.compile
      1. org.codehaus.groovy.transform.ASTTransformationVisitor$3.call(ASTTransformationVisitor.java:268)
      2. org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:801)
      3. org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:466)
      4. org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:445)
      4 frames
    10. org.codehaus.groovy
      MojoSupport.execute
      1. org.codehaus.groovy.maven.runtime.v1_6.ClassCompilerFeature$ClassCompilerImpl.compile(ClassCompilerFeature.java:158)
      2. org.codehaus.groovy.maven.plugin.compile.AbstractCompileMojo.compile(AbstractCompileMojo.java:200)
      3. org.codehaus.groovy.maven.plugin.compile.AbstractCompileMojo.process(AbstractCompileMojo.java:164)
      4. org.codehaus.groovy.maven.plugin.ComponentMojoSupport.doExecute(ComponentMojoSupport.java:60)
      5. org.codehaus.groovy.maven.plugin.MojoSupport.execute(MojoSupport.java:69)
      5 frames
    11. Maven Plugin
      DefaultPluginManager.executeMojo
      1. org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:453)
      1 frame
    12. Maven Core
      DefaultMaven.execute
      1. org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
      2. org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:500)
      3. org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:479)
      4. org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:331)
      5. org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:292)
      6. org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
      7. org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
      8. org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
      8 frames
    13. M3 Interceptor
      MavenCli.main
      1. org.apache.maven.cli.MavenCli.main(MavenCli.java:301)
      1 frame
    14. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    15. Plexus
      Launcher.main
      1. org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
      2. org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
      3. org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
      4. org.codehaus.classworlds.Launcher.main(Launcher.java:375)
      4 frames