-
Bug
-
Resolution: Fixed
-
Critical
-
Powered by SuggestiMate
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
Code changed in jenkins
User: Jesse Glick
Path:
src/main/java/com/sonyericsson/rebuild/RebuildAction.java
src/main/java/com/sonyericsson/rebuild/RebuildActionFactory.java
src/main/java/com/sonyericsson/rebuild/RebuildLastCompletedBuildAction.java
src/main/java/com/sonyericsson/rebuild/RebuildProjectActionFactory.java
src/main/java/com/sonyericsson/rebuild/RebuildValidator.java
src/main/java/com/sonyericsson/rebuild/Rebuilder.java
src/main/resources/com/sonyericsson/rebuild/RebuildAction/RunParameterValue.jelly
src/main/resources/com/sonyericsson/rebuild/RebuildAction/parameterized.jelly
http://jenkins-ci.org/commit/rebuild-plugin/a4c94010177de19207a343b2064600e11e97b54b
Log:
[FIXED JENKINS-26024] Allow this plugin to operate on workflows.
Code changed in jenkins
User: Kohsuke Kawaguchi
Path:
src/main/java/com/sonyericsson/rebuild/RebuildAction.java
src/main/java/com/sonyericsson/rebuild/RebuildActionFactory.java
src/main/java/com/sonyericsson/rebuild/RebuildLastCompletedBuildAction.java
src/main/java/com/sonyericsson/rebuild/RebuildProjectActionFactory.java
src/main/java/com/sonyericsson/rebuild/RebuildValidator.java
src/main/java/com/sonyericsson/rebuild/Rebuilder.java
src/main/resources/com/sonyericsson/rebuild/RebuildAction/RunParameterValue.jelly
src/main/resources/com/sonyericsson/rebuild/RebuildAction/parameterized.jelly
http://jenkins-ci.org/commit/rebuild-plugin/e17364675a5d21acf76e5c5bfc5b2f21cac2b918
Log:
Merge pull request #31 from jenkinsci/JENKINS-26024-workflow
[FIXED JENKINS-26024] Allow this plugin to operate on workflows
Compare: https://github.com/jenkinsci/rebuild-plugin/compare/1ca3940c62a7...e17364675a5d
Code changed in jenkins
User: Jesse Glick
Path:
COMPATIBILITY.md
http://jenkins-ci.org/commit/workflow-plugin/f198f75fd91223d7f440997bfb5d51c0ef04cc6a
Log:
JENKINS-26024 Noting.
Hi
Are there plans to release the plugin with this fix (and others)
(and are the maintainers still around ?)
We currently get a bunch of stacktraces in the log from the latest release version, which is frustrating, considering it has been fixed for a while...
Hard to tell from the plugin’s commit history if it is abandoned or not; the last release was in August, and my attempts to ping the apparent developer in the PR came to nothing. (kohsuke would up merging it.) I would recommend sending out a request for update to the jenkinsci-dev list, CC’ing the maintainers if their email addresses are publicly visible. If there is no response, someone can just cut a release. I am afraid dealing with unresponsive maintainers is a constant battle and there is not a very good process for it.
Any updates on this issue ? we're hitting it on Jenkins ver. 1.609.1 and workflow-plugin ver. 1.9
alfasin both those versions are barely relevant, compared to the Rebuild plugin issue. Supposedly was fixed in 1.23.
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
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)
batmat do you perhaps you have the Gerrit Trigger plugin installed, too? Then you need to update it.
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.
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
https://github.com/jenkinsci/rebuild-plugin/commit/1ca3940c62a79e5e8aba616aa4d79f2e33f24652 avoids the exception but does not make the action actually available and functional.