Why is Copy Artifact failing after upgrading my instance?

Issue

  • After upgrading my instance to a version higher than 2.264.x we have observed that any job including a Copy Artifact step cannot be updated from the configuration page, and we see an error like the one shown below:
2021-03-22 09:42:42.200+0000 [id=369]   WARNING h.i.i.InstallUncaughtExceptionHandler#handleException: Caught unhandled exception with ID 4584a8c4-bd64-4e56-a2eb-ef262b03a972
java.lang.ClassNotFoundException: ["hudson.plugins.copyartifact.StatusBuildSelector","hudson.plugins.copyartifact.SavedBuildSelector","hudson.plugins.copyartifact.TriggeredBuildSelector","hudson.plugins.copyartifact.DownstreamBuildSelector","hudson.plugins.copyartifact.LastBuildWithArtifactSelector","hudson.plugins.copyartifact.LastCompletedBuildSelector","hudson.plugins.copyartifact.PermalinkBuildSelector","hudson.plugins.copyartifact.SpecificBuildSelector","hudson.plugins.copyartifact.WorkspaceSelector","hudson.plugins.copyartifact.ParameterizedBuildSelector"]
        at hudson.PluginManager$UberClassLoader.findClass(PluginManager.java:2179)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
        at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:670)
Caused: java.lang.IllegalArgumentException: Class ["hudson.plugins.copyartifact.StatusBuildSelector","hudson.plugins.copyartifact.SavedBuildSelector","hudson.plugins.copyartifact.TriggeredBuildSelector","hudson.plugins.copyartifact.DownstreamBuildSelector","hudson.plugins.copyartifact.LastBuildWithArtifactSelector","hudson.plugins.copyartifact.LastCompletedBuildSelector","hudson.plugins.copyartifact.PermalinkBuildSelector","hudson.plugins.copyartifact.SpecificBuildSelector","hudson.plugins.copyartifact.WorkspaceSelector","hudson.plugins.copyartifact.ParameterizedBuildSelector"] is specified in JSON, but no such class found in classLoader hudson.PluginManager$UberClassLoader
        at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:675)

Environment

Resolution

As part of the epicJenkins-62437 Change Jenkins configuration UI from tables to divs, some plugins have to be adapted to work in the new and improved UI.

You can get additional details on the different changes in the document linked below:

According to the stacktrace shown above, what you can infer is that the value for the dropdown list existing in the Copy Artifact step was not assigned correctly, and instead of sending the selected value, the stapler request includes all the possible values. This is the result of a failure in the page rendering due to some plugin being incompatible.

The next step here would be to disable any incompatible plugin listed in the KB article shown above.

Tested product/plugin versions

References

Have more questions?

0 Comments

Please sign in to leave a comment.