org.codehaus.groovy.control.MultipleCompilationErrorsException

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.

  • Problem with docker agent (declarative syntax)
    via by Bartłomiej Kruczyk,
  • Simply execute this code in Groovy script : node('MYNODE') { bat ''echo ON ''' } And it will loop infinitely (all I did is deleted a ' after the word bat by accident). Had to reboot server to end the task. Here is the output: Started by user anonymous ERROR: failed to start build org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: WorkflowScript: 13: expecting ''', found '<EOF>' @ line 13, column 2. } ^ 1 error at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:302) at org.codehaus.groovy.control.ErrorCollector.addFatalError(ErrorCollector.java:149) at org.codehaus.groovy.control.ErrorCollector.addError(ErrorCollector.java:119) at org.codehaus.groovy.control.ErrorCollector.addError(ErrorCollector.java:131) at org.codehaus.groovy.control.SourceUnit.addError(SourceUnit.java:359) at org.codehaus.groovy.antlr.AntlrParserPlugin.transformCSTIntoAST(AntlrParserPlugin.java:137) at org.codehaus.groovy.antlr.AntlrParserPlugin.parseCST(AntlrParserPlugin.java:108) at org.codehaus.groovy.control.SourceUnit.parse(SourceUnit.java:236) at org.codehaus.groovy.control.CompilationUnit$1.call(CompilationUnit.java:161) at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:846) at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:550) at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:526) at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:503) at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:302) at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:281) at groovy.lang.GroovyShell.parseClass(GroovyShell.java:731) at groovy.lang.GroovyShell.parse(GroovyShell.java:743) at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:100) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:356) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:323) at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:188) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:374)
    via by Martin Bédard,
  • Jenkins Workflow does not support the standard JSON parser of the Groovy Language: JsonSlurper. This makes it very cumbersome to parse the result of CLI calls such as AWS CLI... *Test case* {code} node { println "Parse JSON file as recommended in Groovy Reference Guide http://www.groovy-lang.org/json.html" def jsonSlurper = new JsonSlurper() def object = jsonSlurper.parseText ''' { "simple": 123, "fraction": 123.66, "exponential": 123e12 }''' println object } {code} *Error Message* {noformat} Started by user admin org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: WorkflowScript: 5: unable to resolve class JsonSlurper @ line 5, column 19. def jsonSlurper = new JsonSlurper() ^ 1 error at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:302) at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:861) at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:550) at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:499) at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:302) at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:281) at groovy.lang.GroovyShell.parseClass(GroovyShell.java:731) at groovy.lang.GroovyShell.parse(GroovyShell.java:743) at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:106) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:362) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:329) at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:208) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:408) Finished: FAILURE {noformat}
    via by Cyrille Le Clerc,
  • Groovy script other script tools functions
    via by Unknown author,
  • [JIRA] (JENKINS-37932) Error if no "agent" specified
    via by pw...@cloudbees.com (JIRA),
  • If you create a pipeline model with no {{agent}} specified you get an error message: {code}org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: WorkflowScript: 3: Missing required section 'agent' @ line 3, column 1. pipeline{ ^ 1 error at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:310) at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1073) at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:591) at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:569) at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:546) at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:298) at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:268) at groovy.lang.GroovyShell.parseClass(GroovyShell.java:688) at groovy.lang.GroovyShell.parse(GroovyShell.java:700) at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:67) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:410) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:373) at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:213) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) Finished: FAILURE {code} Rather than throwing an error should we default to no label node: {{agent label:""}}
    via by Patrick Wolf,
    • org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: WorkflowScript: 3: Expected to find someKey "someValue" @ line 3, column 12. docker { ^ WorkflowScript: 3: Missing required parameter for agent type "docker": image @ line 3, column 5. docker { ^ 2 errors at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:310) at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1073) at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:591) at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:569) at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:546) at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:298) at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:268) at groovy.lang.GroovyShell.parseClass(GroovyShell.java:688) at groovy.lang.GroovyShell.parse(GroovyShell.java:700) at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:67) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:429) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:392) at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:221) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:404)

    Users with the same issue

    serious2monkeys
    8 times, last one,
    derprogger
    56 times, last one,
    Unknown visitor1 times, last one,
    Axelo
    3 times, last one,
    stigkj
    1 times, last one,
    26 more bugmates