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

Jenkins JIRA | Matt Sheehan | 3 years ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.

    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