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

No @DataBoundConstructor on any constructor of class jenkins.plugins.git.GitSCMSourceDefaults

    • workflow-cps 2.68

      For a Multibranch Pipeline job with the following configuration,

      using Scripted Pipeline syntax with the following checkout step,

            stage('Checkout') {
              milestone()
              checkout scm
            }
      

      I'm getting the following stack trace:

      Error storing the arguments for step: checkout
      org.kohsuke.stapler.NoStaplerConstructorException: There's no @DataBoundConstructor on any constructor of class jenkins.plugins.git.GitSCMSourceDefaults
      	at org.kohsuke.stapler.ClassDescriptor.loadConstructorParamNames(ClassDescriptor.java:265)
      	at org.jenkinsci.plugins.structs.describable.DescribableModel.<init>(DescribableModel.java:144)
      	at org.jenkinsci.plugins.structs.describable.DescribableModel.of(DescribableModel.java:114)
      	at org.jenkinsci.plugins.workflow.cps.actions.ArgumentsActionImpl.sanitizeObjectAndRecordMutation(ArgumentsActionImpl.java:294)
      	at org.jenkinsci.plugins.workflow.cps.actions.ArgumentsActionImpl.sanitizeListAndRecordMutation(ArgumentsActionImpl.java:242)
      	at org.jenkinsci.plugins.workflow.cps.actions.ArgumentsActionImpl.sanitizeObjectAndRecordMutation(ArgumentsActionImpl.java:313)
      	at org.jenkinsci.plugins.workflow.cps.actions.ArgumentsActionImpl.sanitizeMapAndRecordMutation(ArgumentsActionImpl.java:386)
      	at org.jenkinsci.plugins.workflow.cps.actions.ArgumentsActionImpl.sanitizeObjectAndRecordMutation(ArgumentsActionImpl.java:311)
      	at org.jenkinsci.plugins.workflow.cps.actions.ArgumentsActionImpl.sanitizeMapAndRecordMutation(ArgumentsActionImpl.java:386)
      	at org.jenkinsci.plugins.workflow.cps.actions.ArgumentsActionImpl.<init>(ArgumentsActionImpl.java:74)
      	at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:245)
      	at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:178)
      	at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:122)
      	at sun.reflect.GeneratedMethodAccessor453.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
      	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
      	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1213)
      	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022)
      	at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:42)
      	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
      	at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:157)
      	at org.kohsuke.groovy.sandbox.GroovyInterceptor.onMethodCall(GroovyInterceptor.java:23)
      	at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:155)
      	at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:155)
      	at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:159)
      	at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:129)
      	at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:129)
      	at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:129)
      	at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:17)
      	at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:57)
      	at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:109)
      	at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:82)
      	at sun.reflect.GeneratedMethodAccessor404.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
      	at com.cloudbees.groovy.cps.impl.PropertyishBlock$ContinuationImpl.get(PropertyishBlock.java:76)
      	at com.cloudbees.groovy.cps.LValueBlock$GetAdapter.receive(LValueBlock.java:30)
      	at com.cloudbees.groovy.cps.impl.PropertyishBlock$ContinuationImpl.fixName(PropertyishBlock.java:66)
      	at sun.reflect.GeneratedMethodAccessor409.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	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:83)
      	at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:174)
      	at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:163)
      	at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:122)
      	at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:261)
      	at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:163)
      	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$101(SandboxContinuable.java:34)
      	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.lambda$run0$0(SandboxContinuable.java:59)
      	at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovySandbox.runInSandbox(GroovySandbox.java:108)
      	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:58)
      	at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:182)
      	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:332)
      	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$200(CpsThreadGroup.java:83)
      	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:244)
      	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:232)
      	at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:64)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:131)
      	at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
      	at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)
      

      Indeed, I can see that no constructor of the GitSCMSourceDefaults class has this @DataBoundConstructor attribute, as the error says. Is this something that needs to be updated?

      I mention the Disable GitHub Multibranch Status plugin we're using (this is a Test environment where we test new Jenkins plugins) in case it's actually the source of the incompatibility here.

          [JENKINS-54186] No @DataBoundConstructor on any constructor of class jenkins.plugins.git.GitSCMSourceDefaults

          Nick Jones created issue -

          Mark Waite added a comment - - edited

          Thanks for a clear bug report. Much appreciated!

          I can't duplicate the problem with the systems currently available to me. I've created a test job which uses `milestone` and `checkout scm` as described in the bug report and have run it successfully in several different multibranch Pipelines on my test server.

          I don't have convenient access to install the Disable GitHub Multibranch Status plugin on that test server. The hotel where I'm staying on business travel blocks my ssh access to my test servers at home.

          Could you attempt to run your failing Declarative Pipeline on a server which does not have the 'Disable GitHub Multibranch Status' plugin installed?

          I won't be able to explore this further for at least another two weeks due to business and personal travel.

          In the interest of full disclosure, I ran my tests on the latest released versions of all the workflow plugins and the latest pre-release of the git plugin and git client plugin. The specific plugin binaries I used are on the lts-with-plugins branch of my docker-lfs repository.

          Mark Waite added a comment - - edited Thanks for a clear bug report. Much appreciated! I can't duplicate the problem with the systems currently available to me. I've created a test job which uses `milestone` and `checkout scm` as described in the bug report and have run it successfully in several different multibranch Pipelines on my test server . I don't have convenient access to install the Disable GitHub Multibranch Status plugin on that test server. The hotel where I'm staying on business travel blocks my ssh access to my test servers at home. Could you attempt to run your failing Declarative Pipeline on a server which does not have the 'Disable GitHub Multibranch Status' plugin installed? I won't be able to explore this further for at least another two weeks due to business and personal travel. In the interest of full disclosure, I ran my tests on the latest released versions of all the workflow plugins and the latest pre-release of the git plugin and git client plugin. The specific plugin binaries I used are on the lts-with-plugins branch of my docker-lfs repository.
          Mark Waite made changes -
          Assignee Original: Mark Waite [ markewaite ]
          Mark Waite made changes -
          Component/s New: disable-github-multibranch-status-plugin [ 23124 ]
          Component/s Original: git-plugin [ 15543 ]

          Tom Parker-Shemilt added a comment - - edited

          This isn't just the Disable GitHub Multibranch Status plugin, as we don't have that installed and we've got the same error occuring. Same versions of all the plugins. I'm using the Declarative Pipeline syntax, and the following test Pipeline

          pipeline {
            agent {
              label 'jenkins-builder'
            }
          
            stages {
              stage('Setup') {
                steps {
                  script {
                    sh 'env'
                    sh 'git submodule update --init'
                  }
                }
              }
            }
          }
          

          Tom Parker-Shemilt added a comment - - edited This isn't just the Disable GitHub Multibranch Status plugin, as we don't have that installed and we've got the same error occuring. Same versions of all the plugins. I'm using the Declarative Pipeline syntax, and the following test Pipeline pipeline { agent { label 'jenkins-builder' } stages { stage( 'Setup' ) { steps { script { sh 'env' sh 'git submodule update --init' } } } } }

          Mark Waite added a comment -

          Can you upload a support bundle? That provides a detailed list of installed plugins and their versions

          Mark Waite added a comment - Can you upload a support bundle? That provides a detailed list of installed plugins and their versions

          We've just updated one of our Jenkins installations with the latest plugins, and are now observing the same error in the logs, and the following Job failures:

           

          ERROR: [GitHub Commit Status Setter] - Cannot retrieve Git metadata for the build, setting build result to UNSTABLE

           

          A list of installed plugins is as follows:

          Plugins

          Name   ↓ Version     Enabled   
          ace-editor 1.1 true
          ansicolor 0.5.2 true
          ant 1.8 true
          antisamy-markup-formatter 1.5 true
          apache-httpcomponents-client-4-api 4.5.5-3.0 true
          authentication-tokens 1.3 true
          aws-java-sdk 1.11.403 true
          bouncycastle-api 2.17 true
          branch-api 2.0.20 true
          build-name-setter 1.6.9 true
          build-timeout 1.19 true
          built-on-column 1.1 true
          cloudbees-folder 6.6 true
          command-launcher 1.2 true
          conditional-buildstep 1.3.6 true
          copyartifact 1.41 true
          credentials 2.1.18 true
          credentials-binding 1.16 true
          display-url-api 2.2.0 true
          docker-commons 1.13 true
          docker-workflow 1.17 true
          durable-task 1.26 true
          embeddable-build-status 1.9 true
          envinject 2.1.6 true
          envinject-api 1.5 true
          extended-read-permission 2.0 true
          external-monitor-job 1.7 true
          ghprb 1.42.0 true
          git 3.9.1 true
          git-client 2.7.3 true
          git-server 1.7 true
          github 1.29.3 true
          github-api 1.92 true
          github-branch-source 2.4.1 true
          github-oauth 0.29 true
          google-metadata-plugin 0.2 true
          google-oauth-plugin 0.6 true
          google-storage-plugin 1.2 true
          greenballs 1.15 true
          handlebars 1.1.1 true
          htmlpublisher 1.17 true
          jackson2-api 2.8.11.3 true
          javadoc 1.4 true
          jdk-tool 1.1 true
          jenkins-multijob-plugin 1.31 true
          jquery-detached 1.2.1 true
          jsch 0.1.54.2 true
          junit 1.26.1 true
          ldap 1.20 true
          leastload 2.0.1 true
          lockable-resources 2.3 true
          mailer 1.22 true
          matrix-auth 2.3 true
          matrix-project 1.13 true
          maven-plugin 3.1.2 true
          momentjs 1.1.1 true
          oauth-credentials 0.3 true
          pam-auth 1.4 true
          parameterized-trigger 2.35.2 true
          pipeline-build-step 2.7 true
          pipeline-graph-analysis 1.7 true
          pipeline-input-step 2.8 true
          pipeline-milestone-step 1.3.1 true
          pipeline-model-api 1.3.2 true
          pipeline-model-declarative-agent 1.1.1 true
          pipeline-model-definition 1.3.2 true
          pipeline-model-extensions 1.3.2 true
          pipeline-rest-api 2.10 true
          pipeline-stage-step 2.3 true
          pipeline-stage-tags-metadata 1.3.2 true
          pipeline-stage-view 2.10 true
          plain-credentials 1.4 true
          postbuildscript 2.8.1 true
          powershell 1.3 true
          resource-disposer 0.12 true
          run-condition 1.2 true
          s3 0.11.2 true
          scm-api 2.3.0 true
          script-security 1.47 true
          slack 2.3 true
          ssh-credentials 1.14 true
          structs 1.17 true
          swarm 3.14 true
          timestamper 1.8.10 true
          token-macro 2.5 true
          windows-slaves 1.3.1 true
          workflow-aggregator 2.6 true
          workflow-api 2.30 true
          workflow-basic-steps 2.11 true
          workflow-cps 2.59 true
          workflow-cps-global-lib 2.12 true
          workflow-durable-task-step 2.24 true
          workflow-job 2.25 true
          workflow-multibranch 2.20 true
          workflow-scm-step 2.7 true
          workflow-step-api 2.16 true
          workflow-support 2.21 true
          ws-cleanup 0.36 true
          yaml-axis 0.2.0 true

          Gavin Williams added a comment - We've just updated one of our Jenkins installations with the latest plugins, and are now observing the same error in the logs, and the following Job failures:   ERROR: [GitHub Commit Status Setter] - Cannot retrieve Git metadata for the build, setting build result to UNSTABLE   A list of installed plugins is as follows: Plugins Name   ↓ Version     Enabled    ace-editor 1.1 true ansicolor 0.5.2 true ant 1.8 true antisamy-markup-formatter 1.5 true apache-httpcomponents-client-4-api 4.5.5-3.0 true authentication-tokens 1.3 true aws-java-sdk 1.11.403 true bouncycastle-api 2.17 true branch-api 2.0.20 true build-name-setter 1.6.9 true build-timeout 1.19 true built-on-column 1.1 true cloudbees-folder 6.6 true command-launcher 1.2 true conditional-buildstep 1.3.6 true copyartifact 1.41 true credentials 2.1.18 true credentials-binding 1.16 true display-url-api 2.2.0 true docker-commons 1.13 true docker-workflow 1.17 true durable-task 1.26 true embeddable-build-status 1.9 true envinject 2.1.6 true envinject-api 1.5 true extended-read-permission 2.0 true external-monitor-job 1.7 true ghprb 1.42.0 true git 3.9.1 true git-client 2.7.3 true git-server 1.7 true github 1.29.3 true github-api 1.92 true github-branch-source 2.4.1 true github-oauth 0.29 true google-metadata-plugin 0.2 true google-oauth-plugin 0.6 true google-storage-plugin 1.2 true greenballs 1.15 true handlebars 1.1.1 true htmlpublisher 1.17 true jackson2-api 2.8.11.3 true javadoc 1.4 true jdk-tool 1.1 true jenkins-multijob-plugin 1.31 true jquery-detached 1.2.1 true jsch 0.1.54.2 true junit 1.26.1 true ldap 1.20 true leastload 2.0.1 true lockable-resources 2.3 true mailer 1.22 true matrix-auth 2.3 true matrix-project 1.13 true maven-plugin 3.1.2 true momentjs 1.1.1 true oauth-credentials 0.3 true pam-auth 1.4 true parameterized-trigger 2.35.2 true pipeline-build-step 2.7 true pipeline-graph-analysis 1.7 true pipeline-input-step 2.8 true pipeline-milestone-step 1.3.1 true pipeline-model-api 1.3.2 true pipeline-model-declarative-agent 1.1.1 true pipeline-model-definition 1.3.2 true pipeline-model-extensions 1.3.2 true pipeline-rest-api 2.10 true pipeline-stage-step 2.3 true pipeline-stage-tags-metadata 1.3.2 true pipeline-stage-view 2.10 true plain-credentials 1.4 true postbuildscript 2.8.1 true powershell 1.3 true resource-disposer 0.12 true run-condition 1.2 true s3 0.11.2 true scm-api 2.3.0 true script-security 1.47 true slack 2.3 true ssh-credentials 1.14 true structs 1.17 true swarm 3.14 true timestamper 1.8.10 true token-macro 2.5 true windows-slaves 1.3.1 true workflow-aggregator 2.6 true workflow-api 2.30 true workflow-basic-steps 2.11 true workflow-cps 2.59 true workflow-cps-global-lib 2.12 true workflow-durable-task-step 2.24 true workflow-job 2.25 true workflow-multibranch 2.20 true workflow-scm-step 2.7 true workflow-step-api 2.16 true workflow-support 2.21 true ws-cleanup 0.36 true yaml-axis 0.2.0 true

          And the plugins that got updated this morning:

          Plugin Current Version Previous Version
          github 1.29.3 1.29.2
          github-branch-source 2.4.1 2.3.6
          htmlpublisher 1.17 1.16
          mailer 1.22 1.21
          scm-api 2.3.0 2.2.8
          script-security 1.47 1.46
          structs 1.17 1.15
          workflow-aggregator 2.6 2.5
          workflow-api 2.30 2.29
          workflow-cps 2.59 2.56
          workflow-cps-global-lib 2.12 2.11
          workflow-durable-task-step 2.24 2.22
          workflow-scm-step 2.7 2.6
          workflow-support 2.21 2.20
          ws-cleanup 0.36 0.34

          Gavin Williams added a comment - And the plugins that got updated this morning: Plugin Current Version Previous Version github 1.29.3 1.29.2 github-branch-source 2.4.1 2.3.6 htmlpublisher 1.17 1.16 mailer 1.22 1.21 scm-api 2.3.0 2.2.8 script-security 1.47 1.46 structs 1.17 1.15 workflow-aggregator 2.6 2.5 workflow-api 2.30 2.29 workflow-cps 2.59 2.56 workflow-cps-global-lib 2.12 2.11 workflow-durable-task-step 2.24 2.22 workflow-scm-step 2.7 2.6 workflow-support 2.21 2.20 ws-cleanup 0.36 0.34

          Nick Jones added a comment -

          markewaite, I removed the Disable GitHub Multibranch Status configuration from this multibranch job (but left the plugin itself installed in this Jenkins system) and reran it, and still get the same @DataBoundConstructor exception in the logs. Given that, it seems conceivable that that's still the plugin at fault here, but less likely. I'm reluctant to remove the plugin entirely since we leverage it for running builds on this test Jenkins instance (without muddying the notifications in GitHub). I also note that that plugin does have the @DataBoundConstructor on its constructor, unlike the constructor for GitSCMSourceDefaults in the main Git plugin.

          Nick Jones added a comment - markewaite , I removed the Disable GitHub Multibranch Status configuration from this multibranch job (but left the plugin itself installed in this Jenkins system) and reran it, and still get the same @DataBoundConstructor exception in the logs. Given that, it seems conceivable that that's still the plugin at fault here, but less likely. I'm reluctant to remove the plugin entirely since we leverage it for running builds on this test Jenkins instance (without muddying the notifications in GitHub). I also note that that plugin does have the @DataBoundConstructor on its constructor, unlike the constructor for GitSCMSourceDefaults in the main Git plugin.

          Gavin Williams added a comment - - edited

          markewaite So I'm playing whack-a-mole with Plugins atm, to try and identify which plugin upgrade broke things for us... 

          So far, I've ruled out:

          • scm-api
          • workflow-scm-step
          • github-branch-source
          • github

           

          Edit: So after downgrading the github plugin, the exceptions are still being logged, however the Commit status' are now being updated correctly... 

          So I'm not sure on the cause and effect there... 

           

          Gavin Williams added a comment - - edited markewaite So I'm playing whack-a-mole with Plugins atm, to try and identify which plugin upgrade broke things for us...  So far, I've ruled out: scm-api workflow-scm-step github-branch-source github   Edit: So after downgrading the github plugin, the exceptions are still being logged, however the Commit status' are now being updated correctly...  So I'm not sure on the cause and effect there...   

            jglick Jesse Glick
            medianick Nick Jones
            Votes:
            43 Vote for this issue
            Watchers:
            72 Start watching this issue

              Created:
              Updated:
              Resolved: