java.lang.ClassCastException: org.jenkinsci.plugins.workflow.job.WorkflowRun cannot be <span class="code-keyword" style="color: #000091">cast</span> to hudson.model.AbstractBuild

Google Groups | sebastia...@outlook.com (JIRA) | 4 months ago
  1. 0

    [JIRA] (JENKINS-37136) Alternate build chooser is not working with the pipeline plugin

    Google Groups | 4 months ago | sebastia...@outlook.com (JIRA)
    java.lang.ClassCastException: org.jenkinsci.plugins.workflow.job.WorkflowRun cannot be <span class="code-keyword" style="color: #000091">cast</span> to hudson.model.AbstractBuild
  2. 0

    Executing the following: {code:title=Jenkinsfile} checkout([$class: 'GitSCM', branches: [[name: "origin/test"], [name: "origin/master"]], doGenerateSubmoduleConfigurations: false, submoduleCfg: [], userRemoteConfigs: [[url: 'some url', credentialsId: 'some creds']], extensions: [ [$class: 'PruneStaleBranch'], [$class: 'CleanBeforeCheckout'], [$class: 'BuildChooserSetting', buildChooser: [$class: 'AlternativeBuildChooser']] ] ]) {code} Throwing the following exception: {code} java.lang.ClassCastException: org.jenkinsci.plugins.workflow.job.WorkflowRun cannot be cast to hudson.model.AbstractBuild at org.jenkinsci.plugins.git.chooser.alternative.AlternativeBuildChooser$1.invoke(AlternativeBuildChooser.java:44) at hudson.plugins.git.GitSCM$BuildChooserContextImpl.actOnBuild(GitSCM.java:907) at org.jenkinsci.plugins.git.chooser.alternative.AlternativeBuildChooser.getCandidateRevisions(AlternativeBuildChooser.java:44) at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:995) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1098) at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:109) at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:83) at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:73) at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:49) at hudson.security.ACL.impersonate(ACL.java:213) at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:47) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) {code}

    Jenkins JIRA | 4 months ago | Sebastian Godelet
    java.lang.ClassCastException: org.jenkinsci.plugins.workflow.job.WorkflowRun cannot be cast to hudson.model.AbstractBuild
  3. 0

    [JIRA] [bitbucket-pullrequest-builder-plugin] (JENKINS-31749) Bitbucket pullrequest builder plugin not compatible with Jenkins core 1.6*

    Google Groups | 1 year ago | owood@cloudbees.com (JIRA)
    java.lang.ClassCastException: org.jenkinsci.plugins.workflow.job.WorkflowJob cannot be <span class="code-keyword" style="color: #000091">cast</span> to hudson.model.AbstractProject
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    [JIRA] [subversion-plugin] (JENKINS-27079) ClassCastException: hudson.scm.SVNRevisionState cannot be cast to hudson.scm.SVNRevisionState

    Google Groups | 2 years ago | ogo...@gmail.com (JIRA)
    java.lang.ClassCastException: hudson.scm.SCMRevisionState$None cannot be <span class="code-keyword" style="color: #000091">cast</span> to hudson.scm.SVNRevisionState
  6. 0

    [JIRA] [build-blocker-plugin] (JENKINS-29924) Items with non-AbstractProjects tasks block the build queue

    Google Groups | 1 year ago | fbelzunc@gmail.com (JIRA)
    java.lang.ClassCastException: com.cloudbees.jenkins.plugins.longrunning.BackgroundTask cannot be <span class="code-keyword" style="color: #000091">cast</span> 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.job.WorkflowRun cannot be <span class="code-keyword" style="color: #000091">cast</span> to hudson.model.AbstractBuild

      at org.jenkinsci.plugins.git.chooser.alternative.AlternativeBuildChooser$1.invoke()
    2. org.jenkinsci.plugins
      AlternativeBuildChooser$1.invoke
      1. org.jenkinsci.plugins.git.chooser.alternative.AlternativeBuildChooser$1.invoke(AlternativeBuildChooser.java:44)
      1 frame
    3. Hudson GIT plugin
      GitSCM$BuildChooserContextImpl.actOnBuild
      1. hudson.plugins.git.GitSCM$BuildChooserContextImpl.actOnBuild(GitSCM.java:907)
      1 frame
    4. org.jenkinsci.plugins
      AlternativeBuildChooser.getCandidateRevisions
      1. org.jenkinsci.plugins.git.chooser.alternative.AlternativeBuildChooser.getCandidateRevisions(AlternativeBuildChooser.java:44)
      1 frame
    5. Hudson GIT plugin
      GitSCM.checkout
      1. hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:995)
      2. hudson.plugins.git.GitSCM.checkout(GitSCM.java:1098)
      2 frames
    6. org.jenkinsci.plugins
      AbstractSynchronousNonBlockingStepExecution$1$1.call
      1. org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:109)
      2. org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:83)
      3. org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:73)
      4. org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:49)
      4 frames
    7. Hudson
      ACL.impersonate
      1. hudson.security.ACL.impersonate(ACL.java:213)
      1 frame
    8. org.jenkinsci.plugins
      AbstractSynchronousNonBlockingStepExecution$1.run
      1. org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:47)
      1 frame
    9. Java RT
      ThreadPoolExecutor$Worker.run
      1. java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
      2. java.util.concurrent.FutureTask.run(Unknown Source)
      3. java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      4. java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      4 frames