Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-26115

MultipleCompilationErrorsException leaves behind unkillable build

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • pipeline

      If a library includes syntax errors, the build pretends to start but cannot be killed:

      Started by user anonymous
      ERROR: failed to start build
      org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
      file:/.../workflow-libs/src/chef/Cookbook.groovy: 5: Invalid duplicate class definition of class chef.Cookbook : The source file:/.../workflow-libs/src/chef/Cookbook.groovy contains at least two definitions of the class chef.Cookbook.
      One of the classes is an explicit generated class using the class statement, the other is a class generated from the script body based on the file name. Solutions are to change the file name or to change the class name.
       @ line 5, column 1.
         class Cookbook {
         ^
      
      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.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:346)
      	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:314)
      	at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:176)
      	at hudson.model.ResourceController.execute(ResourceController.java:89)
      	at hudson.model.Executor.run(Executor.java:240)
      	at hudson.model.OneOffExecutor.run(OneOffExecutor.java:43)
      

      where the library starts

      package chef;
      
      def script = this;
      
      class Cookbook {
          ...
      }
      

          [JENKINS-26115] MultipleCompilationErrorsException leaves behind unkillable build

          Jesse Glick created issue -
          Jesse Glick made changes -
          Priority Original: Minor [ 4 ] New: Major [ 3 ]
          Jesse Glick made changes -
          Link New: This issue depends on JENKINS-25550 [ JENKINS-25550 ]
          Jesse Glick made changes -
          Link New: This issue is related to JENKINS-26179 [ JENKINS-26179 ]
          Jesse Glick made changes -
          Link New: This issue is duplicated by JENKINS-25923 [ JENKINS-25923 ]
          Jesse Glick made changes -
          Link New: This issue is duplicated by JENKINS-27252 [ JENKINS-27252 ]
          Jesse Glick made changes -
          Link New: This issue duplicates JENKINS-29221 [ JENKINS-29221 ]
          Jesse Glick made changes -
          Resolution New: Duplicate [ 3 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 160105 ] New: JNJira + In-Review [ 196319 ]
          Andrew Bayer made changes -
          Component/s New: pipeline-general [ 21692 ]

            kohsuke Kohsuke Kawaguchi
            jglick Jesse Glick
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: