java.lang.ClassCastException: com.cloudbees.hudson.plugins.folder.Folder cannot be cast to hudson.model.Job

Jenkins JIRA | Matt Sheehan | 4 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.

    Root Cause Analysis

    1. java.lang.ClassCastException

      com.cloudbees.hudson.plugins.folder.Folder cannot be cast to hudson.model.Job

      at hudson.plugins.copyartifact.CopyArtifact$EnvAction.getProject()
    2. hudson.plugins.copyartifact
      CopyArtifact.perform
      1. hudson.plugins.copyartifact.CopyArtifact$EnvAction.getProject(CopyArtifact.java:471)
      2. hudson.plugins.copyartifact.CopyArtifact$EnvAction.add(CopyArtifact.java:450)
      3. hudson.plugins.copyartifact.CopyArtifact$EnvAction.access$400(CopyArtifact.java:444)
      4. hudson.plugins.copyartifact.CopyArtifact.perform(CopyArtifact.java:267)
      4 frames
    3. Hudson
      Executor.run
      1. hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
      2. hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:802)
      3. hudson.model.Build$BuildExecution.build(Build.java:199)
      4. hudson.model.Build$BuildExecution.doRun(Build.java:160)
      5. hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:584)
      6. hudson.model.Run.execute(Run.java:1575)
      7. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      8. hudson.model.ResourceController.execute(ResourceController.java:88)
      9. hudson.model.Executor.run(Executor.java:237)
      9 frames