java.lang.ClassCastException: org.jenkinsci.plugins.workflow.support.steps.ExecutorStepExecution$PlaceholderTask cannot be cast to hudson.model.AbstractProject

Jenkins JIRA | Will Saxon | 1 year ago
  1. 0

    Jenkins issues - [JIRA] [build-blocker-plugin] (JENKINS-29295) build-blocker-plugin 1.7.1 breaks workflow jobs

    nabble.com | 11 months ago
    java.lang.ClassCastException: org.jenkinsci.plugins.workflow.support.steps.ExecutorStepExecution$PlaceholderTask cannot be cast to hudson.model.AbstractProject
  2. 0

    Once we installed build-blocker-plugin 1.7.1, workflow jobs hung trying to allocate a node: {quote}Started by user Builder Running: Allocate node : Start Still waiting to schedule task Waiting for next available executor on node1.local{quote} When the workflow job hangs like this, not only is the step hung, but other unrelated jobs will queue up even if they aren't trying to run on the same node, i.e. if my workflow job depends on label 'feature' then even jobs which do not require 'feature' and would not build on a machine my workflow job would build on are also hung up. The jenkins log contains the following for each hung job: {quote}SEVERE: Timer task hudson.model.Queue$MaintainTask@6bb9a704 failed java.lang.ClassCastException: org.jenkinsci.plugins.workflow.support.steps.ExecutorStepExecution$PlaceholderTask cannot be cast to hudson.model.AbstractProject at hudson.plugins.buildblocker.BuildBlockerQueueTaskDispatcher.getBuildBlockerProperty(BuildBlockerQueueTaskDispatcher.java:199) at hudson.plugins.buildblocker.BuildBlockerQueueTaskDispatcher.canTake(BuildBlockerQueueTaskDispatcher.java:108) at hudson.model.Queue$JobOffer.canTake(Queue.java:299) at hudson.model.Queue.maintain(Queue.java:1355) at hudson.model.Queue$MaintainTask.doRun(Queue.java:2450) at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:51) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) {quote} Downgrading from build-blocker-plugin 1.7.1 to (in my case) 1.6 solved the problem.

    Jenkins JIRA | 1 year ago | Will Saxon
    java.lang.ClassCastException: org.jenkinsci.plugins.workflow.support.steps.ExecutorStepExecution$PlaceholderTask cannot be cast to hudson.model.AbstractProject
  3. 0

    Once we installed build-blocker-plugin 1.7.1, workflow jobs hung trying to allocate a node: {quote}Started by user Builder Running: Allocate node : Start Still waiting to schedule task Waiting for next available executor on node1.local{quote} When the workflow job hangs like this, not only is the step hung, but other unrelated jobs will queue up even if they aren't trying to run on the same node, i.e. if my workflow job depends on label 'feature' then even jobs which do not require 'feature' and would not build on a machine my workflow job would build on are also hung up. The jenkins log contains the following for each hung job: {quote}SEVERE: Timer task hudson.model.Queue$MaintainTask@6bb9a704 failed java.lang.ClassCastException: org.jenkinsci.plugins.workflow.support.steps.ExecutorStepExecution$PlaceholderTask cannot be cast to hudson.model.AbstractProject at hudson.plugins.buildblocker.BuildBlockerQueueTaskDispatcher.getBuildBlockerProperty(BuildBlockerQueueTaskDispatcher.java:199) at hudson.plugins.buildblocker.BuildBlockerQueueTaskDispatcher.canTake(BuildBlockerQueueTaskDispatcher.java:108) at hudson.model.Queue$JobOffer.canTake(Queue.java:299) at hudson.model.Queue.maintain(Queue.java:1355) at hudson.model.Queue$MaintainTask.doRun(Queue.java:2450) at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:51) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) {quote} Downgrading from build-blocker-plugin 1.7.1 to (in my case) 1.6 solved the problem.

    Jenkins JIRA | 1 year ago | Will Saxon
    java.lang.ClassCastException: org.jenkinsci.plugins.workflow.support.steps.ExecutorStepExecution$PlaceholderTask cannot be cast to hudson.model.AbstractProject
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    [workflow-plugin] ClassCastException on brand new project

    Google Groups | 1 year ago | Brantone
    java.lang.ClassCastException: org.jenkinsci.plugins.workflow.support.steps.ExecutorStepExecution$PlaceholderTask cannot be cast to hudson.model.AbstractProject
  6. 0

    Jenkins users - [workflow-plugin] ClassCastException on brand new project

    nabble.com | 11 months ago
    java.lang.ClassCastException: org.jenkinsci.plugins.workflow.support.steps.ExecutorStepExecution$PlaceholderTask cannot be cast to hudson.model.AbstractProject

    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. java.lang.ClassCastException

      org.jenkinsci.plugins.workflow.support.steps.ExecutorStepExecution$PlaceholderTask cannot be cast to hudson.model.AbstractProject

      at hudson.plugins.buildblocker.BuildBlockerQueueTaskDispatcher.getBuildBlockerProperty()
    2. hudson.plugins.buildblocker
      BuildBlockerQueueTaskDispatcher.canTake
      1. hudson.plugins.buildblocker.BuildBlockerQueueTaskDispatcher.getBuildBlockerProperty(BuildBlockerQueueTaskDispatcher.java:199)
      2. hudson.plugins.buildblocker.BuildBlockerQueueTaskDispatcher.canTake(BuildBlockerQueueTaskDispatcher.java:108)
      2 frames
    3. Hudson
      SafeTimerTask.run
      1. hudson.model.Queue$JobOffer.canTake(Queue.java:299)
      2. hudson.model.Queue.maintain(Queue.java:1355)
      3. hudson.model.Queue$MaintainTask.doRun(Queue.java:2450)
      4. hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:51)
      4 frames
    4. Java RT
      Thread.run
      1. java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
      2. java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
      3. java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
      4. java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
      5. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      6. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      7. java.lang.Thread.run(Thread.java:745)
      7 frames