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

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

    Details

    • Similar Issues:

      Description

      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.

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Alex Earl
            Path:
            pom.xml
            src/main/java/hudson/plugins/emailext/EmailExtTemplateActionFactory.java
            http://jenkins-ci.org/commit/email-ext-plugin/f56bf85320cc1b2f6089b117efc70b595a115593
            Log:
            Workaround for JENKINS-25940

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Alex Earl Path: pom.xml src/main/java/hudson/plugins/emailext/EmailExtTemplateActionFactory.java http://jenkins-ci.org/commit/email-ext-plugin/f56bf85320cc1b2f6089b117efc70b595a115593 Log: Workaround for JENKINS-25940
            Hide
            slide_o_mix Alex Earl added a comment -

            Is this still an issue?

            Show
            slide_o_mix Alex Earl added a comment - Is this still an issue?
            Hide
            danielbeck Daniel Beck added a comment -

            Alex Earl It is. The fix is only in 2.39.2 and 2.39.3, and an instance with 2.40.5 (jenkins.ci.cloudbees.com) currently fails to load a bunch of Maven jobs.

            Show
            danielbeck Daniel Beck added a comment - Alex Earl It is. The fix is only in 2.39.2 and 2.39.3, and an instance with 2.40.5 (jenkins.ci.cloudbees.com) currently fails to load a bunch of Maven jobs.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Daniel Beck
            Path:
            src/main/java/hudson/plugins/emailext/EmailExtTemplateActionFactory.java
            http://jenkins-ci.org/commit/email-ext-plugin/512a8fc4e217bf5919590ce067cdc10309103594
            Log:
            JENKINS-25940 Add workaround to prevent NPE in Maven projects

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Beck Path: src/main/java/hudson/plugins/emailext/EmailExtTemplateActionFactory.java http://jenkins-ci.org/commit/email-ext-plugin/512a8fc4e217bf5919590ce067cdc10309103594 Log: JENKINS-25940 Add workaround to prevent NPE in Maven projects
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Alex Earl
            Path:
            src/main/java/hudson/plugins/emailext/EmailExtTemplateActionFactory.java
            http://jenkins-ci.org/commit/email-ext-plugin/fa8e9e27e6d76f1bb7a57dcb26044d3c7f8ece8c
            Log:
            Merge pull request #106 from daniel-beck/JENKINS-25940

            JENKINS-25940 Add workaround to prevent NPE in Maven projects

            Compare: https://github.com/jenkinsci/email-ext-plugin/compare/08345482dd6f...fa8e9e27e6d7

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Alex Earl Path: src/main/java/hudson/plugins/emailext/EmailExtTemplateActionFactory.java http://jenkins-ci.org/commit/email-ext-plugin/fa8e9e27e6d76f1bb7a57dcb26044d3c7f8ece8c Log: Merge pull request #106 from daniel-beck/ JENKINS-25940 JENKINS-25940 Add workaround to prevent NPE in Maven projects Compare: https://github.com/jenkinsci/email-ext-plugin/compare/08345482dd6f...fa8e9e27e6d7

              People

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

                Dates

                • Created:
                  Updated: