java.lang.ClassCastException: hudson.model.Cause$UserIdCause cannot be cast to hudson.model.Cause$UpstreamCause

Jenkins JIRA | Daniel Bengtsson | 10 months ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    When I am using "Build triggered by current MultiJob build" for "Copy artifacts from another project" and I trigger the job directly (i.e. not from my MultiJob job) I get: {code} 00:00:03.447 ERROR: Build step failed with exception 00:00:03.447 java.lang.ClassCastException: hudson.model.Cause$UserIdCause cannot be cast to hudson.model.Cause$UpstreamCause 00:00:03.447 at com.tikal.jenkins.plugins.multijob.MultiJobBuildSelector.getBuild(MultiJobBuildSelector.java:44) 00:00:03.447 at hudson.plugins.copyartifact.CopyArtifact.perform(CopyArtifact.java:402) 00:00:03.447 at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78) 00:00:03.447 at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) 00:00:03.447 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782) 00:00:03.447 at hudson.model.Build$BuildExecution.build(Build.java:205) 00:00:03.447 at hudson.model.Build$BuildExecution.doRun(Build.java:162) 00:00:03.447 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534) 00:00:03.447 at hudson.model.Run.execute(Run.java:1738) 00:00:03.447 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) 00:00:03.447 at hudson.model.ResourceController.execute(ResourceController.java:98) 00:00:03.447 at hudson.model.Executor.run(Executor.java:410) 00:00:03.447 Build step 'Copy artifacts from another project' marked build as failure {code} I understand that there is no multijob to copy from, but it would be nice if it was possible to build the job anyway. And even so should it really throw an exception ? Is there any way to use a fallback ?

    Jenkins JIRA | 10 months ago | Daniel Bengtsson
    java.lang.ClassCastException: hudson.model.Cause$UserIdCause cannot be cast to hudson.model.Cause$UpstreamCause
  2. 0

    When I am using "Build triggered by current MultiJob build" for "Copy artifacts from another project" and I trigger the job directly (i.e. not from my MultiJob job) I get: {code} 00:00:03.447 ERROR: Build step failed with exception 00:00:03.447 java.lang.ClassCastException: hudson.model.Cause$UserIdCause cannot be cast to hudson.model.Cause$UpstreamCause 00:00:03.447 at com.tikal.jenkins.plugins.multijob.MultiJobBuildSelector.getBuild(MultiJobBuildSelector.java:44) 00:00:03.447 at hudson.plugins.copyartifact.CopyArtifact.perform(CopyArtifact.java:402) 00:00:03.447 at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78) 00:00:03.447 at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) 00:00:03.447 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782) 00:00:03.447 at hudson.model.Build$BuildExecution.build(Build.java:205) 00:00:03.447 at hudson.model.Build$BuildExecution.doRun(Build.java:162) 00:00:03.447 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534) 00:00:03.447 at hudson.model.Run.execute(Run.java:1738) 00:00:03.447 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) 00:00:03.447 at hudson.model.ResourceController.execute(ResourceController.java:98) 00:00:03.447 at hudson.model.Executor.run(Executor.java:410) 00:00:03.447 Build step 'Copy artifacts from another project' marked build as failure {code} I understand that there is no multijob to copy from, but it would be nice if it was possible to build the job anyway. And even so should it really throw an exception ? Is there any way to use a fallback ?

    Jenkins JIRA | 10 months ago | Daniel Bengtsson
    java.lang.ClassCastException: hudson.model.Cause$UserIdCause cannot be cast to hudson.model.Cause$UpstreamCause

    Root Cause Analysis

    1. java.lang.ClassCastException

      hudson.model.Cause$UserIdCause cannot be cast to hudson.model.Cause$UpstreamCause

      at com.tikal.jenkins.plugins.multijob.MultiJobBuildSelector.getBuild()
    2. com.tikal.jenkins
      MultiJobBuildSelector.getBuild
      1. com.tikal.jenkins.plugins.multijob.MultiJobBuildSelector.getBuild(MultiJobBuildSelector.java:44)
      1 frame
    3. hudson.plugins.copyartifact
      CopyArtifact.perform
      1. hudson.plugins.copyartifact.CopyArtifact.perform(CopyArtifact.java:402)
      1 frame
    4. Hudson
      Executor.run
      1. hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
      2. hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      3. hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
      4. hudson.model.Build$BuildExecution.build(Build.java:205)
      5. hudson.model.Build$BuildExecution.doRun(Build.java:162)
      6. hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
      7. hudson.model.Run.execute(Run.java:1738)
      8. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      9. hudson.model.ResourceController.execute(ResourceController.java:98)
      10. hudson.model.Executor.run(Executor.java:410)
      10 frames