Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-28011

Failed to instantiate class hudson.plugins.copyartifact.CopyArtifact when saving a job

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      When changing the configuration of any job which uses the copy artifact plugin I receive the following stack trace, other jobs can be reconfigured successfully.
      Looking at thejob configuration they were last updated with version 1.32.1 of the plugin.

      javax.servlet.ServletException: java.lang.RuntimeException: Failed to instantiate class hudson.plugins.copyartifact.CopyArtifact from {"projectName":"TestJob","":"0","selector":{"stableOnly":false,"kind":""},"filter":"build_results/TestJob/**","excludes":"","target":"TargetDir/Executables","parameters":"","flatten":false,"optional":true,"fingerprintArtifacts":true,"stapler-class":"hudson.plugins.copyartifact.CopyArtifact","$class":"hudson.plugins.copyartifact.CopyArtifact"}
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:796)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
      	at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:249)
      	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)
      	at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:123)
      	at hudson.plugins.scm_sync_configuration.extensions.ScmSyncConfigurationFilter$1.call(ScmSyncConfigurationFilter.java:46)
      	at hudson.plugins.scm_sync_configuration.ScmSyncConfigurationDataProvider.provideRequestDuring(ScmSyncConfigurationDataProvider.java:103)
      	at hudson.plugins.scm_sync_configuration.extensions.ScmSyncConfigurationFilter.doFilter(ScmSyncConfigurationFilter.java:42)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:120)
      	at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:114)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:48)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
      	at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
      	at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
      	at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:168)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
      	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:610)
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
      	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
      	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
      	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
      	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
      	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
      	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:315)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.RuntimeException: Failed to instantiate class hudson.plugins.copyartifact.CopyArtifact from {"projectName":"TestJob","":"0","selector":{"stableOnly":false,"kind":""},"filter":"build_results/TestJob/**","excludes":"","target":"TargetDir/Executables","parameters":"","flatten":false,"optional":true,"fingerprintArtifacts":true,"stapler-class":"hudson.plugins.copyartifact.CopyArtifact","$class":"hudson.plugins.copyartifact.CopyArtifact"}
      	at hudson.model.Descriptor.newInstance(Descriptor.java:577)
      	at hudson.model.Descriptor.newInstancesFromHeteroList(Descriptor.java:926)
      	at hudson.model.Descriptor.newInstancesFromHeteroList(Descriptor.java:900)
      	at hudson.util.DescribableList.rebuildHetero(DescribableList.java:205)
      	at hudson.model.Project.submit(Project.java:232)
      	at hudson.model.Job.doConfigSubmit(Job.java:1203)
      	at hudson.model.AbstractProject.doConfigSubmit(AbstractProject.java:785)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:483)
      	at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:298)
      	at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:161)
      	at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:96)
      	at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:121)
      	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
      	... 67 more
      Caused by: java.lang.IllegalArgumentException: Failed to instantiate class hudson.plugins.copyartifact.CopyArtifact from {"projectName":"TestJob","":"0","selector":{"stableOnly":false,"kind":""},"filter":"build_results/TestJob/**","excludes":"","target":"TargetDir/Executables","parameters":"","flatten":false,"optional":true,"fingerprintArtifacts":true,"stapler-class":"hudson.plugins.copyartifact.CopyArtifact","$class":"hudson.plugins.copyartifact.CopyArtifact"}
      	at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:602)
      	at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:404)
      	at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:400)
      	at hudson.model.Descriptor.newInstance(Descriptor.java:568)
      	... 83 more
      Caused by: java.lang.IllegalArgumentException: Failed to instantiate class hudson.plugins.copyartifact.BuildSelector from {"stableOnly":false,"kind":""}
      	at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:602)
      	at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:404)
      	at org.kohsuke.stapler.RequestImpl.injectSetters(RequestImpl.java:764)
      	at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:703)
      	at org.kohsuke.stapler.RequestImpl.access$200(RequestImpl.java:81)
      	at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:600)
      	... 86 more
      Caused by: org.kohsuke.stapler.NoStaplerConstructorException: There's no @DataBoundConstructor on any constructor of class hudson.plugins.copyartifact.BuildSelector
      	at org.kohsuke.stapler.ClassDescriptor.loadConstructorParamNames(ClassDescriptor.java:177)
      	at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:684)
      	at org.kohsuke.stapler.RequestImpl.access$200(RequestImpl.java:81)
      	at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:600)
      	... 91 more
      

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            src/main/java/hudson/plugins/copyartifact/CopyArtifact.java
            src/main/resources/hudson/plugins/copyartifact/CopyArtifact/config.jelly
            src/test/java/hudson/plugins/copyartifact/CopyArtifactTest.java
            http://jenkins-ci.org/commit/copyartifact-plugin/e1a88091816e92243f9a4765679ba535588b7f74
            Log:
            [FIXED JENKINS-28011] Using the standard f:dropdownDescriptorSelector.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/hudson/plugins/copyartifact/CopyArtifact.java src/main/resources/hudson/plugins/copyartifact/CopyArtifact/config.jelly src/test/java/hudson/plugins/copyartifact/CopyArtifactTest.java http://jenkins-ci.org/commit/copyartifact-plugin/e1a88091816e92243f9a4765679ba535588b7f74 Log: [FIXED JENKINS-28011] Using the standard f:dropdownDescriptorSelector.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: ikedam
            Path:
            src/main/java/hudson/plugins/copyartifact/CopyArtifact.java
            src/main/java/hudson/plugins/copyartifact/StatusBuildSelector.java
            src/main/java/hudson/plugins/copyartifact/TriggeredBuildSelector.java
            src/main/resources/hudson/plugins/copyartifact/CopyArtifact/config.jelly
            src/main/resources/hudson/plugins/copyartifact/CopyArtifact/help-selector.html
            src/main/resources/hudson/plugins/copyartifact/CopyArtifact/help-selector_de.html
            src/main/resources/hudson/plugins/copyartifact/CopyArtifact/help-selector_ja.html
            src/main/resources/hudson/plugins/copyartifact/LastCompletedBuildSelector/config.jelly
            src/main/resources/hudson/plugins/copyartifact/ParameterizedBuildSelector/config.jelly
            src/main/resources/hudson/plugins/copyartifact/ParameterizedBuildSelector/help-parameterName.html
            src/main/resources/hudson/plugins/copyartifact/ParameterizedBuildSelector/help-parameterName_de.html
            src/main/resources/hudson/plugins/copyartifact/ParameterizedBuildSelector/help-parameterName_ja.html
            src/main/resources/hudson/plugins/copyartifact/SavedBuildSelector/config.jelly
            src/main/resources/hudson/plugins/copyartifact/SpecificBuildSelector/config.jelly
            src/main/resources/hudson/plugins/copyartifact/SpecificBuildSelector/help-buildNumber.html
            src/main/resources/hudson/plugins/copyartifact/StatusBuildSelector/config.jelly
            src/main/resources/hudson/plugins/copyartifact/TriggeredBuildSelector/config.jelly
            src/main/webapp/help-buildSelector.html
            src/main/webapp/help-buildSelector_de.html
            src/main/webapp/help-buildSelector_ja.html
            src/main/webapp/help-parameterName.html
            src/main/webapp/help-parameterName_de.html
            src/main/webapp/help-parameterName_ja.html
            src/main/webapp/help-specificBuild.html
            src/test/java/hudson/plugins/copyartifact/BuildSelectorParameterTest.java
            src/test/java/hudson/plugins/copyartifact/CopyArtifactTest.java
            http://jenkins-ci.org/commit/copyartifact-plugin/ff6073c766284cb2f189975ecfd314d9c5ed4679
            Log:
            Merge pull request #62 from jglick/dropdownDescriptorSelector-JENKINS-28011

            JENKINS-28011 Using the standard f:dropdownDescriptorSelector

            Compare: https://github.com/jenkinsci/copyartifact-plugin/compare/d574c008bf2f...ff6073c76628

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: ikedam Path: src/main/java/hudson/plugins/copyartifact/CopyArtifact.java src/main/java/hudson/plugins/copyartifact/StatusBuildSelector.java src/main/java/hudson/plugins/copyartifact/TriggeredBuildSelector.java src/main/resources/hudson/plugins/copyartifact/CopyArtifact/config.jelly src/main/resources/hudson/plugins/copyartifact/CopyArtifact/help-selector.html src/main/resources/hudson/plugins/copyartifact/CopyArtifact/help-selector_de.html src/main/resources/hudson/plugins/copyartifact/CopyArtifact/help-selector_ja.html src/main/resources/hudson/plugins/copyartifact/LastCompletedBuildSelector/config.jelly src/main/resources/hudson/plugins/copyartifact/ParameterizedBuildSelector/config.jelly src/main/resources/hudson/plugins/copyartifact/ParameterizedBuildSelector/help-parameterName.html src/main/resources/hudson/plugins/copyartifact/ParameterizedBuildSelector/help-parameterName_de.html src/main/resources/hudson/plugins/copyartifact/ParameterizedBuildSelector/help-parameterName_ja.html src/main/resources/hudson/plugins/copyartifact/SavedBuildSelector/config.jelly src/main/resources/hudson/plugins/copyartifact/SpecificBuildSelector/config.jelly src/main/resources/hudson/plugins/copyartifact/SpecificBuildSelector/help-buildNumber.html src/main/resources/hudson/plugins/copyartifact/StatusBuildSelector/config.jelly src/main/resources/hudson/plugins/copyartifact/TriggeredBuildSelector/config.jelly src/main/webapp/help-buildSelector.html src/main/webapp/help-buildSelector_de.html src/main/webapp/help-buildSelector_ja.html src/main/webapp/help-parameterName.html src/main/webapp/help-parameterName_de.html src/main/webapp/help-parameterName_ja.html src/main/webapp/help-specificBuild.html src/test/java/hudson/plugins/copyartifact/BuildSelectorParameterTest.java src/test/java/hudson/plugins/copyartifact/CopyArtifactTest.java http://jenkins-ci.org/commit/copyartifact-plugin/ff6073c766284cb2f189975ecfd314d9c5ed4679 Log: Merge pull request #62 from jglick/dropdownDescriptorSelector- JENKINS-28011 JENKINS-28011 Using the standard f:dropdownDescriptorSelector Compare: https://github.com/jenkinsci/copyartifact-plugin/compare/d574c008bf2f...ff6073c76628
            Hide
            ikedam ikedam added a comment -

            Fixed in copyartifact-1.35.1.
            It will be available in a day.

            This is a problem only in Jenkins 1.610 and I highly recommend you to upgrade your Jenkins to the latest one or use a LTS version.

            Show
            ikedam ikedam added a comment - Fixed in copyartifact-1.35.1. It will be available in a day. This is a problem only in Jenkins 1.610 and I highly recommend you to upgrade your Jenkins to the latest one or use a LTS version.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            core/src/main/resources/lib/form/class-entry.jelly
            http://jenkins-ci.org/commit/jenkins/ecc848b20dd3d972c76f9435e83908e419111fe2
            Log:
            [FIXED JENKINS-28011] Amending #1563, ${descriptor} is not necessarily ${attrs.descriptor}!
            (cherry picked from commit 343382b9ff8a978f6914cc64714a5c16bd9b511a)

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: core/src/main/resources/lib/form/class-entry.jelly http://jenkins-ci.org/commit/jenkins/ecc848b20dd3d972c76f9435e83908e419111fe2 Log: [FIXED JENKINS-28011] Amending #1563, ${descriptor} is not necessarily ${attrs.descriptor}! (cherry picked from commit 343382b9ff8a978f6914cc64714a5c16bd9b511a)
            Hide
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #4292
            [FIXED JENKINS-28011] Amending #1563, ${descriptor} is not necessarily ${attrs.descriptor}! (Revision ecc848b20dd3d972c76f9435e83908e419111fe2)

            Result = UNSTABLE
            jesse glick : ecc848b20dd3d972c76f9435e83908e419111fe2
            Files :

            • core/src/main/resources/lib/form/class-entry.jelly
            Show
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #4292 [FIXED JENKINS-28011] Amending #1563, ${descriptor} is not necessarily ${attrs.descriptor}! (Revision ecc848b20dd3d972c76f9435e83908e419111fe2) Result = UNSTABLE jesse glick : ecc848b20dd3d972c76f9435e83908e419111fe2 Files : core/src/main/resources/lib/form/class-entry.jelly

              People

              • Assignee:
                jglick Jesse Glick
                Reporter:
                alanbirtles Alan Birtles
              • Votes:
                11 Vote for this issue
                Watchers:
                21 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: