java.lang.ClassCastException: org.jenkinsci.plugins.workflow.job.WorkflowJob cannot be cast to hudson.model.AbstractProject

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Google Groups by owood@cloudbees.com (JIRA), 2 years ago
org.jenkinsci.plugins.workflow.job.WorkflowJob cannot be <span class="code-keyword" style="color: #000091">cast</span> to hudson.model.AbstractProject
via GitHub by fonsecas72
, 1 year ago
org.jenkinsci.plugins.workflow.job.WorkflowJob cannot be cast to hudson.model.AbstractProject
java.lang.ClassCastException: org.jenkinsci.plugins.workflow.job.WorkflowJob cannot be cast to hudson.model.AbstractProject
at bitbucketpullrequestbuilder.bitbucketpullrequestbuilder.BitbucketBuildTrigger.start(BitbucketBuildTrigger.java:23)
at org.jenkinsci.plugins.workflow.job.WorkflowJob.onLoad(WorkflowJob.java:132)
at hudson.model.Items.load(Items.java:320)
at jenkins.model.Jenkins$17.run(Jenkins.java:2651)
at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
at jenkins.model.Jenkins$7.runTask(Jenkins.java:904)
at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210)
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)

Users with the same issue

You are the first who have seen this exception.

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.