# Jenkins Seed Job Unable to Resolve Class

**URL:** <https://community.jenkins.io/t/jenkins-seed-job-unable-to-resolve-class/15744>\
**Category:** Using Jenkins\
**Tags:** question, pipeline\
**Created:** [June 6, 2024, 3:41am UTC](https://community.jenkins.io/t/jenkins-seed-job-unable-to-resolve-class/15744 "2024-06-06T03:41:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![current817](https://avatars.discourse-cdn.com/v4/letter/c/a8b319/32.png) [@current817](https://community.jenkins.io/u/current817)\
**Post date:** [June 6, 2024, 3:41am UTC](https://community.jenkins.io/t/jenkins-seed-job-unable-to-resolve-class/15744/1 "2024-06-06T03:41:53Z")

</div>

Hi Jenkins experts,

I have a pipeline using Jenkins DSL plugin to generate jobs from the seed job.

In one of the job DSL, I had the following lines:

```auto
import org.jenkinsci.plugins.workflow.steps.FlowInterruptedException
import org.jenkinsci.plugins.workflow.support.steps.build.RunWrapper
import org.jenkinsci.plugins.workflow.support.steps.build.BuildUpstreamCause
import org.jenkinsci.plugins.workflow.cps.replay.ReplayCause

```

When trying to build the seed job, I got errors:

```auto
unable to resolve class org.jenkinsci.plugins.workflow.support.steps.build.BuildUpstreamCause
 @ line 14, column 1.
   import org.jenkinsci.plugins.workflow.support.steps.build.BuildUpstreamCause

// Same for the RunWrapper and ReplayCause

```

The mystery is when I tried to rebuild a generated job with the above DSL change (loaded as Jenkins shared library), the import works fine. I also notice the seed job has no issues importing the `FlowInterruptedException` class which also comes from a plugin. Did I miss anything here? Would appreciate any insight on how to fix it.

---

<div class="post-metadata">

**Author:** ![poddingue](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/poddingue/32/985_2.png) [@poddingue](https://community.jenkins.io/u/poddingue)\
**Post date:** [June 6, 2024, 12:45pm UTC](https://community.jenkins.io/t/jenkins-seed-job-unable-to-resolve-class/15744/2 "2024-06-06T12:45:04Z")

</div>

Hi @current817,

Could the issue you’re facing be due to the fact that the Jenkins Job DSL plugin and the Pipeline plugin have different classpath?  
At least, I think that’s the case. 🤔

As far as I know, the [Job DSL plugin](https://plugins.jenkins.io/job-dsl) may not have access to all classes that are available in a Pipeline script.

---

<div class="post-metadata">

**Author:** ![current817](https://avatars.discourse-cdn.com/v4/letter/c/a8b319/32.png) [@current817](https://community.jenkins.io/u/current817)\
**Post date:** [June 6, 2024, 4:41pm UTC](https://community.jenkins.io/t/jenkins-seed-job-unable-to-resolve-class/15744/3 "2024-06-06T16:41:12Z")

</div>

Yeah, that’s also my guess. One mystery is I was able to see some other classes imported from the some plugins without issues.
