org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: Script6: 24: unable to resolve class junit.framework.Test @ line 24, column 1. import junit.framework.Test ^ 1 error

Jenkins JIRA | James Nord | 8 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Not sure how to reproduce but I have seen the following in the logs. it looks like a badly formed script in the pipeline prevents Jenkins from deleting the build (unverified). It could be the build is deleted, but the log is spammed. Potential Steps to reproduce: # create a pipleine with an erronous script. # build it several times. # Inspect the logs and see that builds are not being deleted/rotated {noformat} 2016-09-21 11:44:56.182-0700 [id=29802] WARNING hudson.model.RunMap#retrieve: could not load E:\some\path\blah\jobname\680 org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: Script6: 24: unable to resolve class junit.framework.Test @ line 24, column 1. import junit.framework.Test ^ 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:67) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:413) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.loadProgramAsync(CpsFlowExecution.java:501) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.onLoad(CpsFlowExecution.java:476) at org.jenkinsci.plugins.workflow.job.WorkflowRun.onLoad(WorkflowRun.java:476) at hudson.model.RunMap.retrieve(RunMap.java:224) at hudson.model.RunMap.retrieve(RunMap.java:56) at jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap.java:479) at jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap.java:461) at jenkins.model.lazy.AbstractLazyLoadRunMap.getByNumber(AbstractLazyLoadRunMap.java:367) at jenkins.model.lazy.AbstractLazyLoadRunMap.search(AbstractLazyLoadRunMap.java:318) at jenkins.model.lazy.AbstractLazyLoadRunMap.oldestBuild(AbstractLazyLoadRunMap.java:278) at jenkins.model.lazy.LazyBuildMixIn.getFirstBuild(LazyBuildMixIn.java:231) at org.jenkinsci.plugins.workflow.job.WorkflowJob.getFirstBuild(WorkflowJob.java:216) at org.jenkinsci.plugins.workflow.job.WorkflowJob.getFirstBuild(WorkflowJob.java:100) at hudson.tasks.LogRotator.perform(LogRotator.java:137) at hudson.model.Job.logRotate(Job.java:478) at org.jenkinsci.plugins.workflow.job.WorkflowRun.finish(WorkflowRun.java:541) at org.jenkinsci.plugins.workflow.job.WorkflowRun.access$1100(WorkflowRun.java:111) at org.jenkinsci.plugins.workflow.job.WorkflowRun$GraphL.onNewHead(WorkflowRun.java:797) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.notifyListeners(CpsFlowExecution.java:984) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$4.run(CpsThreadGroup.java:429) at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$1.run(CpsVmExecutorService.java:32) at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:112) at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) {noformat}

    Jenkins JIRA | 8 months ago | James Nord
    org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: Script6: 24: unable to resolve class junit.framework.Test @ line 24, column 1. import junit.framework.Test ^ 1 error
  2. 0

    [JIRA] [workflow-plugin] (JENKINS-32508) Workflow does not support the standard Groovy JSON parser: JsonSlurper

    Google Groups | 1 year ago | cleclerc@cloudbees.com (JIRA)
    org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: WorkflowScript: 5: unable to resolve class JsonSlurper @ line 5, column 19. def jsonSlurper = new JsonSlurper() ^ 1 error
  3. 0

    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}

    Jenkins JIRA | 1 year ago | Cyrille Le Clerc
    org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: WorkflowScript: 5: unable to resolve class JsonSlurper @ line 5, column 19. def jsonSlurper = new JsonSlurper() ^ 1 error
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    why not release a stable version? I'm crazy

    GitHub | 6 months ago | seanzhau
    org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: WorkflowScript: 2: unable to resolve class Library , unable to find class for annotation @ line 2, column 1. @Library('github.com/fabric8io/fabric8-pipeline-library@master') ^ WorkflowScript: 28: unable to resolve class io.fabric8.Utils @ line 28, column 13. def utils = new io.fabric8.Utils() ^ 2 errors
  6. 0

    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}

    Jenkins JIRA | 1 year ago | Cyrille Le Clerc
    org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: WorkflowScript: 5: unable to resolve class JsonSlurper @ line 5, column 19. def jsonSlurper = new JsonSlurper() ^ 1 error
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. org.codehaus.groovy.control.MultipleCompilationErrorsException

    startup failed: Script6: 24: unable to resolve class junit.framework.Test @ line 24, column 1. import junit.framework.Test ^ 1 error

    at org.codehaus.groovy.control.ErrorCollector.failIfErrors()
  2. Groovy
    GroovyShell.parse
    1. org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:302)
    2. org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:861)
    3. org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:550)
    4. org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:499)
    5. groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:302)
    6. groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:281)
    7. groovy.lang.GroovyShell.parseClass(GroovyShell.java:731)
    8. groovy.lang.GroovyShell.parse(GroovyShell.java:743)
    8 frames
  3. org.jenkinsci.plugins
    WorkflowRun.onLoad
    1. org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:67)
    2. org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:413)
    3. org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.loadProgramAsync(CpsFlowExecution.java:501)
    4. org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.onLoad(CpsFlowExecution.java:476)
    5. org.jenkinsci.plugins.workflow.job.WorkflowRun.onLoad(WorkflowRun.java:476)
    5 frames
  4. Hudson
    RunMap.retrieve
    1. hudson.model.RunMap.retrieve(RunMap.java:224)
    2. hudson.model.RunMap.retrieve(RunMap.java:56)
    2 frames
  5. jenkins.model.lazy
    LazyBuildMixIn.getFirstBuild
    1. jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap.java:479)
    2. jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap.java:461)
    3. jenkins.model.lazy.AbstractLazyLoadRunMap.getByNumber(AbstractLazyLoadRunMap.java:367)
    4. jenkins.model.lazy.AbstractLazyLoadRunMap.search(AbstractLazyLoadRunMap.java:318)
    5. jenkins.model.lazy.AbstractLazyLoadRunMap.oldestBuild(AbstractLazyLoadRunMap.java:278)
    6. jenkins.model.lazy.LazyBuildMixIn.getFirstBuild(LazyBuildMixIn.java:231)
    6 frames
  6. org.jenkinsci.plugins
    WorkflowJob.getFirstBuild
    1. org.jenkinsci.plugins.workflow.job.WorkflowJob.getFirstBuild(WorkflowJob.java:216)
    2. org.jenkinsci.plugins.workflow.job.WorkflowJob.getFirstBuild(WorkflowJob.java:100)
    2 frames
  7. Hudson
    Job.logRotate
    1. hudson.tasks.LogRotator.perform(LogRotator.java:137)
    2. hudson.model.Job.logRotate(Job.java:478)
    2 frames
  8. org.jenkinsci.plugins
    CpsVmExecutorService$1.run
    1. org.jenkinsci.plugins.workflow.job.WorkflowRun.finish(WorkflowRun.java:541)
    2. org.jenkinsci.plugins.workflow.job.WorkflowRun.access$1100(WorkflowRun.java:111)
    3. org.jenkinsci.plugins.workflow.job.WorkflowRun$GraphL.onNewHead(WorkflowRun.java:797)
    4. org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.notifyListeners(CpsFlowExecution.java:984)
    5. org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$4.run(CpsThreadGroup.java:429)
    6. org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$1.run(CpsVmExecutorService.java:32)
    6 frames
  9. Hudson :: Remoting Layer
    SingleLaneExecutorService$1.run
    1. hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:112)
    1 frame
  10. jenkins.util
    ContextResettingExecutorService$1.run
    1. jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
    1 frame
  11. Java RT
    Thread.run
    1. java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    2. java.util.concurrent.FutureTask.run(FutureTask.java:266)
    3. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    4. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    5. java.lang.Thread.run(Thread.java:745)
    5 frames