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

NoStaplerConstructorException on UserMergeOptions.mergeStrategy

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • git-plugin
    • Jenkins 1.642.3, Pipeline 2.0, Git Plugin 2.4.4, Git Client Plugin 1.19.6

      Using Jenkins 1.642.3 and Pipeline 2.0, an exception is thrown when the DataBoundConstructor is missing from plugin code. The problem can be reproduced with the following line up: Jenkins 1.642.3, Pipeline 2.0, Git Plugin 2.4.4, Git Client Plugin 1.19.6.

      The problem did not exists with Pipeline 1.15 and Jenkins 1.642.1.

      To reproduce the problem, install those plugins, create a Pipeline job, and go in the snippet generator, then:

      • select the "checkout" step
      • select Git
      • Additional behaviors: Merge Before Build
      • Click "Generate Groovy"

      The stacktrace in the console should contain:

      Caused by: org.kohsuke.stapler.NoStaplerConstructorException: There's no @DataBoundConstructor on any constructor of class org.jenkinsci.plugins.gitclient.MergeCommand$Strategy
      

      And there is no groovy code generated.

          [JENKINS-34070] NoStaplerConstructorException on UserMergeOptions.mergeStrategy

          Martin d'Anjou created issue -
          Jesse Glick made changes -
          Priority Original: Minor [ 4 ] New: Critical [ 2 ]
          Jesse Glick made changes -
          Labels New: regression
          Jesse Glick made changes -
          Summary Original: Pipeline 2.0 causes snippet generator to throw exception when DataBoundConstructor is missing New: Pipeline 2.0 causes snippet generator to throw exception when dealing with enums
          Jesse Glick made changes -
          Component/s New: git-plugin [ 15543 ]
          Component/s Original: workflow-plugin [ 18820 ]
          Labels Original: regression New: regression workflow
          Priority Original: Critical [ 2 ] New: Major [ 3 ]
          Summary Original: Pipeline 2.0 causes snippet generator to throw exception when dealing with enums New: NoStaplerConstructorException on UserMergeOptions.mergeStrategy
          Jesse Glick made changes -
          Link New: This issue is related to JENKINS-31925 [ JENKINS-31925 ]
          Jesse Glick made changes -
          Remote Link New: This issue links to "structs PR 4 (Web Link)" [ 14172 ]
          Martin d'Anjou made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Jesse Glick made changes -
          Assignee Original: Jesse Glick [ jglick ] New: Martin d'Anjou [ deepchip ]
          Jesse Glick made changes -
          Epic Link New: JENKINS-35393 [ 171186 ]
          Jesse Glick made changes -
          Link New: This issue is related to JENKINS-34459 [ JENKINS-34459 ]

            jglick Jesse Glick
            deepchip Martin d'Anjou
            Votes:
            5 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: