java.lang.ClassCastException: org.jenkinsci.plugins.workflow.job.WorkflowRun cannot be cast to hudson.model.AbstractBuild
              at com.sonyericsson.rebuild.RebuildActionFactory.createFor(RebuildActionFactory.java:50)
      

          [JENKINS-26024] Does not work with workflows

          Nir Alfasi added a comment -

          Any updates on this issue ? we're hitting it on Jenkins ver. 1.609.1 and workflow-plugin ver. 1.9

          Nir Alfasi added a comment - Any updates on this issue ? we're hitting it on Jenkins ver. 1.609.1 and workflow-plugin ver. 1.9

          Jesse Glick added a comment -

          alfasin both those versions are barely relevant, compared to the Rebuild plugin issue. Supposedly was fixed in 1.23.

          Jesse Glick added a comment - alfasin both those versions are barely relevant, compared to the Rebuild plugin issue. Supposedly was fixed in 1.23.

          Nir Alfasi added a comment - - edited

          Thanks!

          Nir Alfasi added a comment - - edited Thanks!

          Code changed in jenkins
          User: Jesse Glick
          Path:
          COMPATIBILITY.md
          http://jenkins-ci.org/commit/workflow-plugin/0ee0d33c63cf4802143f29faf463497be2e5859f
          Log:
          JENKINS-26024 Noting release version.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: COMPATIBILITY.md http://jenkins-ci.org/commit/workflow-plugin/0ee0d33c63cf4802143f29faf463497be2e5859f Log: JENKINS-26024 Noting release version.

          Is anybody actually confirming the fix & release >= 1.24 is working for them? Just installed Rebuild 1.25 and still no Rebuild "button".

          Workflow 1.2 & Jenkins 1.593 (yeah, upgrading very soon, could it be related btw?)

          Thanks

          Baptiste Mathus added a comment - Is anybody actually confirming the fix & release >= 1.24 is working for them? Just installed Rebuild 1.25 and still no Rebuild "button". Workflow 1.2 & Jenkins 1.593 (yeah, upgrading very soon, could it be related btw?) Thanks

          Just found a stack trace in the logs that might explain why it's not showing up:

          oct. 30, 2015 5:26:49 PM hudson.model.listeners.RunListener report
          AVERTISSEMENT: RunListener failed
          java.lang.AbstractMethodError: you must override the new overload of isApplicable
                  at com.sonyericsson.rebuild.RebuildValidator.isApplicable(RebuildValidator.java:50)
                  at com.sonyericsson.rebuild.Rebuilder.onCompleted(Rebuilder.java:53)
                  at hudson.model.listeners.RunListener.fireCompleted(RunListener.java:199)
                  at org.jenkinsci.plugins.workflow.job.WorkflowRun.finish(WorkflowRun.java:332)
                  at org.jenkinsci.plugins.workflow.job.WorkflowRun.access$800(WorkflowRun.java:89)
                  at org.jenkinsci.plugins.workflow.job.WorkflowRun$GraphL.onNewHead(WorkflowRun.java:586)
                  at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.notifyListeners(CpsFlowExecution.java:696)
                  at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$4.run(CpsThreadGroup.java:313)
                  at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$1.run(CpsVmExecutorService.java:32)
                  at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:111)
                  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)
          

          Baptiste Mathus added a comment - Just found a stack trace in the logs that might explain why it's not showing up: oct. 30, 2015 5:26:49 PM hudson.model.listeners.RunListener report AVERTISSEMENT: RunListener failed java.lang.AbstractMethodError: you must override the new overload of isApplicable at com.sonyericsson.rebuild.RebuildValidator.isApplicable(RebuildValidator.java:50) at com.sonyericsson.rebuild.Rebuilder.onCompleted(Rebuilder.java:53) at hudson.model.listeners.RunListener.fireCompleted(RunListener.java:199) at org.jenkinsci.plugins.workflow.job.WorkflowRun.finish(WorkflowRun.java:332) at org.jenkinsci.plugins.workflow.job.WorkflowRun.access$800(WorkflowRun.java:89) at org.jenkinsci.plugins.workflow.job.WorkflowRun$GraphL.onNewHead(WorkflowRun.java:586) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.notifyListeners(CpsFlowExecution.java:696) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$4.run(CpsThreadGroup.java:313) at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$1.run(CpsVmExecutorService.java:32) at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:111) 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)

          Jesse Glick added a comment -

          batmat do you perhaps you have the Gerrit Trigger plugin installed, too? Then you need to update it.

          Jesse Glick added a comment - batmat do you perhaps you have the Gerrit Trigger plugin installed, too? Then you need to update it .

          Jesse Glick added a comment -

          Though probably for better compatibility we should

          diff --git a/src/main/java/com/sonyericsson/rebuild/RebuildValidator.java b/src/main/java/com/sonyericsson/rebuild/RebuildValidator.java
          index 8c4cc0d..3a8aa0c 100644
          --- a/src/main/java/com/sonyericsson/rebuild/RebuildValidator.java
          +++ b/src/main/java/com/sonyericsson/rebuild/RebuildValidator.java
          @@ -47,7 +47,7 @@ public abstract class RebuildValidator implements Serializable, ExtensionPoint {
                   if (Util.isOverridden(RebuildValidator.class, getClass(), "isApplicable", AbstractBuild.class) && build instanceof AbstractBuild) {
                       return isApplicable((AbstractBuild) build);
                   } else {
          -            throw new AbstractMethodError("you must override the new overload of isApplicable");
          +            return false;
                   }
               }
           
          

          batmat if that patch fixes the problem for you (without a Gerrit Trigger update), please file it as a PR.

          Jesse Glick added a comment - Though probably for better compatibility we should diff --git a/src/main/java/com/sonyericsson/rebuild/RebuildValidator.java b/src/main/java/com/sonyericsson/rebuild/RebuildValidator.java index 8c4cc0d..3a8aa0c 100644 --- a/src/main/java/com/sonyericsson/rebuild/RebuildValidator.java +++ b/src/main/java/com/sonyericsson/rebuild/RebuildValidator.java @@ -47,7 +47,7 @@ public abstract class RebuildValidator implements Serializable, ExtensionPoint { if (Util.isOverridden(RebuildValidator.class, getClass(), "isApplicable" , AbstractBuild.class) && build instanceof AbstractBuild) { return isApplicable((AbstractBuild) build); } else { - throw new AbstractMethodError( "you must override the new overload of isApplicable" ); + return false ; } } batmat if that patch fixes the problem for you (without a Gerrit Trigger update), please file it as a PR.

          Code changed in jenkins
          User: Jesse Glick
          Path:
          src/main/java/com/sonyericsson/rebuild/RebuildValidator.java
          http://jenkins-ci.org/commit/rebuild-plugin/c6e6c78f8ab826f7fc47744e0437d365a8d0ac12
          Log:
          JENKINS-26024 Display a more informative error message.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/com/sonyericsson/rebuild/RebuildValidator.java http://jenkins-ci.org/commit/rebuild-plugin/c6e6c78f8ab826f7fc47744e0437d365a8d0ac12 Log: JENKINS-26024 Display a more informative error message.

          Code changed in jenkins
          User: Gustaf Lundh
          Path:
          src/main/java/com/sonyericsson/rebuild/RebuildValidator.java
          http://jenkins-ci.org/commit/rebuild-plugin/bf41e54fc5b7ac7b9023f82dec3cb09cd5924321
          Log:
          Merge pull request #39 from jglick/diag-JENKINS-26024

          JENKINS-26024 Display a more informative error message

          Compare: https://github.com/jenkinsci/rebuild-plugin/compare/e0c296ed41fe...bf41e54fc5b7

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Gustaf Lundh Path: src/main/java/com/sonyericsson/rebuild/RebuildValidator.java http://jenkins-ci.org/commit/rebuild-plugin/bf41e54fc5b7ac7b9023f82dec3cb09cd5924321 Log: Merge pull request #39 from jglick/diag- JENKINS-26024 JENKINS-26024 Display a more informative error message Compare: https://github.com/jenkinsci/rebuild-plugin/compare/e0c296ed41fe...bf41e54fc5b7

            jglick Jesse Glick
            jglick Jesse Glick
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: