Details

    • Similar Issues:

      Description

      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)
      

        Attachments

          Issue Links

            Activity

            Hide
            batmat 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)
            
            Show
            batmat 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)
            Hide
            jglick Jesse Glick added a comment -

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

            Show
            jglick Jesse Glick added a comment - Baptiste Mathus do you perhaps you have the Gerrit Trigger plugin installed, too? Then you need to update it .
            Hide
            jglick 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;
                     }
                 }
             
            

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

            Show
            jglick 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 ; } } Baptiste Mathus if that patch fixes the problem for you (without a Gerrit Trigger update), please file it as a PR.
            Hide
            scm_issue_link 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.

            Show
            scm_issue_link 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.
            Hide
            scm_issue_link 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

            Show
            scm_issue_link 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

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: