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

Job save removes obligatory <defaultValue> of <hudson.model.StringParameterDefinition>

XMLWordPrintable

    • Maven Plugin 3.10

      After a recent update of Jenkins and all plugins we encountered this exception in multiple jobs:

      ERROR: Processing failed due to a bug in the code. Please report this to the issue tracker (https://jenkins.io/redirect/report-an-issue).
      java.lang.NullPointerException
      	at java.base/java.util.concurrent.ConcurrentHashMap.putVal(ConcurrentHashMap.java:1011)
      	at java.base/java.util.concurrent.ConcurrentHashMap.put(ConcurrentHashMap.java:1006)
      	at java.base/java.util.Properties.put(Properties.java:1337)
      	at hudson.maven.MavenModuleSetBuild$PomParser.<init>(MavenModuleSetBuild.java:1171)
      	at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.parsePoms(MavenModuleSetBuild.java:985)
      	at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:689)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:513)
      	at hudson.model.Run.execute(Run.java:1907)
      	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)
      	at hudson.model.ResourceController.execute(ResourceController.java:97)
      	at hudson.model.Executor.run(Executor.java:429)
      project=hudson.maven.MavenModuleSet@409eb7a3[...]
      

      Resolving this proved to be quite difficult, but we finally found out that Jenkins seems to remove the <defaultValue></defaultValue> entry of a <hudson.model.StringParameterDefinition> in the config.xml upon save when the default value is empty.

      This triggers the exception. After manually reverting the deletion and reloading the config via the Jenkins GUI, the job is able to run again.

      The same happens for each <hudson.model.ChoiceParameterDefinition> without a default value, but there the element seems to be optional during execution as it triggers no exception.

            jglick Jesse Glick
            stifm Sven
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: