java.lang.ClassCastException: class hudson.plugins.copyartifact.CopyArtifact

Jenkins JIRA | Nathan Swartzentruber | 2 years ago
  1. 0

    When trying to execute a step with the Copy Artifact plugin in the specified environment, I receive a ClassCastException. My Workflow script is the following: node('master') { step($class: 'hudson.plugins.copyartifact.CopyArtifact', projectName: 'ChineseBitmaps', filter: 'ChineseBitmaps.zip') } And when I attempt to run, it fails with the following console output: Running: Allocate node : Body : Start Running: General Build Step Running: Allocate node : Body : End Running: Allocate node : End Running: End of Workflow java.lang.ClassCastException: class hudson.plugins.copyartifact.CopyArtifact at java.lang.Class.asSubclass(Unknown Source) at org.jenkinsci.plugins.workflow.structs.DescribableHelper.coerce(DescribableHelper.java:183) at org.jenkinsci.plugins.workflow.structs.DescribableHelper.buildArguments(DescribableHelper.java:133) at org.jenkinsci.plugins.workflow.structs.DescribableHelper.instantiate(DescribableHelper.java:81) at org.jenkinsci.plugins.workflow.steps.StepDescriptor.newInstance(StepDescriptor.java:95) at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:134) at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:98) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:45) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) at com.cloudbees.groovy.cps.sandbox.DefaultInvoker.methodCall(DefaultInvoker.java:15) at WorkflowScript.run(WorkflowScript:2) at Unknown.Unknown(Unknown) at ___cps.transform___(Native Method) at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:69) at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:100) at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:76) at sun.reflect.GeneratedMethodAccessor565.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72) at com.cloudbees.groovy.cps.impl.CollectionLiteralBlock$ContinuationImpl.dispatch(CollectionLiteralBlock.java:55) at com.cloudbees.groovy.cps.impl.CollectionLiteralBlock$ContinuationImpl.item(CollectionLiteralBlock.java:45) at sun.reflect.GeneratedMethodAccessor119.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72) at com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java:21) at com.cloudbees.groovy.cps.Next.step(Next.java:58) at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:145) at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:164) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:267) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$000(CpsThreadGroup.java:70) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:176) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:174) at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:47) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:111) at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run

    Jenkins JIRA | 2 years ago | Nathan Swartzentruber
    java.lang.ClassCastException: class hudson.plugins.copyartifact.CopyArtifact
  2. 0

    When trying to execute a step with the Copy Artifact plugin in the specified environment, I receive a ClassCastException. My Workflow script is the following: node('master') { step($class: 'hudson.plugins.copyartifact.CopyArtifact', projectName: 'ChineseBitmaps', filter: 'ChineseBitmaps.zip') } And when I attempt to run, it fails with the following console output: Running: Allocate node : Body : Start Running: General Build Step Running: Allocate node : Body : End Running: Allocate node : End Running: End of Workflow java.lang.ClassCastException: class hudson.plugins.copyartifact.CopyArtifact at java.lang.Class.asSubclass(Unknown Source) at org.jenkinsci.plugins.workflow.structs.DescribableHelper.coerce(DescribableHelper.java:183) at org.jenkinsci.plugins.workflow.structs.DescribableHelper.buildArguments(DescribableHelper.java:133) at org.jenkinsci.plugins.workflow.structs.DescribableHelper.instantiate(DescribableHelper.java:81) at org.jenkinsci.plugins.workflow.steps.StepDescriptor.newInstance(StepDescriptor.java:95) at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:134) at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:98) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:45) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) at com.cloudbees.groovy.cps.sandbox.DefaultInvoker.methodCall(DefaultInvoker.java:15) at WorkflowScript.run(WorkflowScript:2) at Unknown.Unknown(Unknown) at ___cps.transform___(Native Method) at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:69) at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:100) at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:76) at sun.reflect.GeneratedMethodAccessor565.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72) at com.cloudbees.groovy.cps.impl.CollectionLiteralBlock$ContinuationImpl.dispatch(CollectionLiteralBlock.java:55) at com.cloudbees.groovy.cps.impl.CollectionLiteralBlock$ContinuationImpl.item(CollectionLiteralBlock.java:45) at sun.reflect.GeneratedMethodAccessor119.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72) at com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java:21) at com.cloudbees.groovy.cps.Next.step(Next.java:58) at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:145) at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:164) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:267) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$000(CpsThreadGroup.java:70) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:176) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:174) at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:47) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:111) at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run

    Jenkins JIRA | 2 years ago | Nathan Swartzentruber
    java.lang.ClassCastException: class hudson.plugins.copyartifact.CopyArtifact
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    Jboss to exclude org.jboss.ws.jaxws-client module

    Stack Overflow | 2 years ago | Michel Foucault
    java.lang.ClassCastException: class org.apache.cxf.bus.spring.SpringBusFactory
  5. 0

    Calling a SOAP service from a RESTful service

    Stack Overflow | 3 years ago | karan
    java.lang.ClassCastException: class org.apache.cxf.bus.spring.SpringBusFactory

  1. maxxi 4 times, last 2 months ago
8 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.ClassCastException

    class hudson.plugins.copyartifact.CopyArtifact

    at java.lang.Class.asSubclass()
  2. Java RT
    Class.asSubclass
    1. java.lang.Class.asSubclass(Unknown Source)
    1 frame
  3. org.jenkinsci.plugins
    CpsScript.invokeMethod
    1. org.jenkinsci.plugins.workflow.structs.DescribableHelper.coerce(DescribableHelper.java:183)
    2. org.jenkinsci.plugins.workflow.structs.DescribableHelper.buildArguments(DescribableHelper.java:133)
    3. org.jenkinsci.plugins.workflow.structs.DescribableHelper.instantiate(DescribableHelper.java:81)
    4. org.jenkinsci.plugins.workflow.steps.StepDescriptor.newInstance(StepDescriptor.java:95)
    5. org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:134)
    6. org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:98)
    6 frames
  4. Groovy
    AbstractCallSite.call
    1. org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:45)
    2. org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
    3. org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
    3 frames
  5. com.cloudbees.groovy
    DefaultInvoker.methodCall
    1. com.cloudbees.groovy.cps.sandbox.DefaultInvoker.methodCall(DefaultInvoker.java:15)
    1 frame
  6. Unknown
    ___cps.transform___
    1. WorkflowScript.run(WorkflowScript:2)
    2. Unknown.Unknown(Unknown)
    3. ___cps.transform___(Native Method)
    3 frames
  7. com.cloudbees.groovy
    FunctionCallBlock$ContinuationImpl.fixArg
    1. com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:69)
    2. com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:100)
    3. com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:76)
    3 frames
  8. Java RT
    Method.invoke
    1. sun.reflect.GeneratedMethodAccessor565.invoke(Unknown Source)
    2. sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    3. java.lang.reflect.Method.invoke(Unknown Source)
    3 frames
  9. com.cloudbees.groovy
    CollectionLiteralBlock$ContinuationImpl.item
    1. com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
    2. com.cloudbees.groovy.cps.impl.CollectionLiteralBlock$ContinuationImpl.dispatch(CollectionLiteralBlock.java:55)
    3. com.cloudbees.groovy.cps.impl.CollectionLiteralBlock$ContinuationImpl.item(CollectionLiteralBlock.java:45)
    3 frames
  10. Java RT
    Method.invoke
    1. sun.reflect.GeneratedMethodAccessor119.invoke(Unknown Source)
    2. sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    3. java.lang.reflect.Method.invoke(Unknown Source)
    3 frames
  11. com.cloudbees.groovy
    Continuable.run0
    1. com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
    2. com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java:21)
    3. com.cloudbees.groovy.cps.Next.step(Next.java:58)
    4. com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:145)
    4 frames
  12. org.jenkinsci.plugins
    CpsVmExecutorService$2.call
    1. org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:164)
    2. org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:267)
    3. org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$000(CpsThreadGroup.java:70)
    4. org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:176)
    5. org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:174)
    6. org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:47)
    6 frames
  13. Java RT
    FutureTask.run
    1. java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    2. java.util.concurrent.FutureTask.run(Unknown Source)
    2 frames
  14. Hudson :: Remoting Layer
    SingleLaneExecutorService$1.run
    1. hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:111)
    1 frame
  15. jenkins.util
    ContextResettingExecutorService$1.run
    1. jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
    1 frame
  16. Java RT
    ThreadPoolExecutor$Worker.runTask
    1. java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    2. java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    3. java.util.concurrent.FutureTask.run(Unknown Source)
    4. java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    4 frames