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

NPE from EmailExtTemplateActionFactory.createFor due to MavenModuleSet.getPublishersList being null

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • maven-plugin
    • None

      Just updated some plugins and found some Maven projects not loading due to

      java.lang.NullPointerException
      	at hudson.plugins.emailext.EmailExtTemplateActionFactory.createFor(EmailExtTemplateActionFactory.java:27)
      	at hudson.model.AbstractProject.createTransientActions(AbstractProject.java:761)
      	at hudson.maven.AbstractMavenProject.createTransientActions(AbstractMavenProject.java:179)
      	at hudson.maven.MavenModuleSet.createTransientActions(MavenModuleSet.java:465)
      	at hudson.model.AbstractProject.updateTransientActions(AbstractProject.java:751)
      	at hudson.maven.MavenModuleSet.updateTransientActions(MavenModuleSet.java:461)
      	at hudson.model.AbstractProject.onLoad(AbstractProject.java:338)
      	at hudson.maven.MavenModuleSet.onLoad(MavenModuleSet.java:791)
      

      Seems like https://github.com/jenkinsci/email-ext-plugin/commit/6f5dd8ff0f6e665f33e909bc3ac4d75bb2a38fc8 is newly asking for getPublishersList, and in MavenModuleSet.createTransientActions this might temporarily be null, as a comment warns—after the place where this NPE is being thrown.

      It is just not allowed to return null from this method. The implementation in Project in core gets around this (JENKINS-18589) using an atomic field updater.

      A temporary workaround in Email Ext would be to check for null here.

          [JENKINS-25940] NPE from EmailExtTemplateActionFactory.createFor due to MavenModuleSet.getPublishersList being null

          Jesse Glick created issue -
          Jesse Glick made changes -
          Assignee Original: Alex Earl [ slide_o_mix ]
          Jesse Glick made changes -
          Link New: This issue is related to JENKINS-18589 [ JENKINS-18589 ]

          Jesse Glick added a comment - - edited

          Temporarily reverting to 2.38.1, which avoids the issue until we can get a proper fix in maven-plugin.

          Jesse Glick added a comment - - edited Temporarily reverting to 2.38.1, which avoids the issue until we can get a proper fix in maven-plugin .

          Alex Earl added a comment -

          I can probably cut a 2.39.1 later tonight with a work around.

          Alex Earl added a comment - I can probably cut a 2.39.1 later tonight with a work around.

          Jesse Glick added a comment -

          Thanks, that would save some headaches.

          Jesse Glick added a comment - Thanks, that would save some headaches.

          Jesse Glick added a comment -

          JENKINS-22811 means the whole folder can be broken by this currently.

          Jesse Glick added a comment - JENKINS-22811 means the whole folder can be broken by this currently.
          Jesse Glick made changes -
          Link New: This issue depends on JENKINS-22811 [ JENKINS-22811 ]

          Alex Earl added a comment -

          2.39.2 is released

          Alex Earl added a comment - 2.39.2 is released

          Jesse Glick added a comment -

          Thanks, that makes this less urgent.

          Jesse Glick added a comment - Thanks, that makes this less urgent.
          Jesse Glick made changes -
          Component/s Original: email-ext-plugin [ 15538 ]
          Labels Original: regression
          Priority Original: Critical [ 2 ] New: Major [ 3 ]

            Unassigned Unassigned
            jglick Jesse Glick
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: