Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Component/s: maven-plugin
    • Labels:
      None
    • Environment:
      Hudson 1.392 on Windows server 2008
    • Similar Issues:
      Show 5 results

      Description

      Maven job build that runs on master ends with NPE while sending mails??

      [INFO] BUILD SUCCESSFUL
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 262 minutes 52 seconds
      [INFO] Finished at: Thu Jan 06 04:47:20 IST 2011
      [INFO] Final Memory: 308M/930M
      [INFO] ------------------------------------------------------------------------
      Waiting for Hudson to finish collecting data
      Sending e-mails to: xxx@yyy.com jjj@yyy.com
      channel stopped
      FATAL: null
      java.lang.NullPointerException
      at java.lang.String.startsWith(String.java:1421)
      at java.lang.String.startsWith(String.java:1450)
      at hudson.maven.MavenModuleSetBuild$1.isDescendantOf(MavenModuleSetBuild.java:213)
      at hudson.maven.MavenModuleSetBuild$1.<init>(MavenModuleSetBuild.java:182)
      at hudson.maven.MavenModuleSetBuild.getChangeSetFor(MavenModuleSetBuild.java:176)
      at hudson.maven.FilteredChangeLogSet.<init>(FilteredChangeLogSet.java:51)
      at hudson.maven.MavenBuild.getChangeSet(MavenBuild.java:164)
      at hudson.model.AbstractBuild.hasParticipant(AbstractBuild.java:316)
      at hudson.model.AbstractProject.hasParticipant(AbstractProject.java:1274)
      at hudson.model.User.getProjects(User.java:381)
      at hudson.scm.MailAddressResolverImpl.findMailAddressFor(MailAddressResolverImpl.java:19)
      at hudson.tasks.MailAddressResolver.resolve(MailAddressResolver.java:97)
      at hudson.tasks.Mailer$UserProperty.getAddress(Mailer.java:496)
      at hudson.tasks.MailSender.buildCulpritList(MailSender.java:383)
      at hudson.tasks.MailSender.createEmptyMail(MailSender.java:345)
      at hudson.tasks.MailSender.createBackToNormalMail(MailSender.java:169)
      at hudson.tasks.MailSender.getMail(MailSender.java:160)
      at hudson.tasks.MailSender.execute(MailSender.java:94)
      at hudson.maven.MavenModuleSetBuild$RunnerImpl.cleanUp(MavenModuleSetBuild.java:772)
      at hudson.model.Run.run(Run.java:1405)
      at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:400)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:145)

        Attachments

          Issue Links

            Activity

            Hide
            kutzi kutzi added a comment -

            Looks like another duplicate of JENKINS-7684 to me.

            Show
            kutzi kutzi added a comment - Looks like another duplicate of JENKINS-7684 to me.
            Hide
            olamy olamy added a comment -

            probably dupe of JENKINS-8452.
            Can you try with 1.394 ?

            Show
            olamy olamy added a comment - probably dupe of JENKINS-8452 . Can you try with 1.394 ?
            Hide
            liyatikal liyatikal added a comment -

            Using 1.394 doesn't help.
            Now some successful build logs look like this:

            [INFO] ------------------------------------------------------------------------
            [INFO] ------------------------------------------------------------------------
            [INFO] BUILD SUCCESSFUL
            [INFO] ------------------------------------------------------------------------
            [INFO] Total time: 289 minutes 50 seconds
            [INFO] Finished at: Tue Jan 18 05:09:31 IST 2011
            [INFO] Final Memory: 320M/908M
            [INFO] ------------------------------------------------------------------------
            channel stopped
            FATAL: null
            java.lang.NullPointerException

            Show
            liyatikal liyatikal added a comment - Using 1.394 doesn't help. Now some successful build logs look like this: [INFO] ------------------------------------------------------------------------ [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------ [INFO] Total time: 289 minutes 50 seconds [INFO] Finished at: Tue Jan 18 05:09:31 IST 2011 [INFO] Final Memory: 320M/908M [INFO] ------------------------------------------------------------------------ channel stopped FATAL: null java.lang.NullPointerException
            Hide
            olamy olamy added a comment -

            any sample project to reproduce this ?

            Show
            olamy olamy added a comment - any sample project to reproduce this ?
            Hide
            liyatikal liyatikal added a comment -

            I don't have any sample project, I only have a few complicated ones which are internal.
            But it does happen every build, so I had to downgrade again to 1.376 (patch with ant 1.80)

            Show
            liyatikal liyatikal added a comment - I don't have any sample project, I only have a few complicated ones which are internal. But it does happen every build, so I had to downgrade again to 1.376 (patch with ant 1.80)
            Hide
            drulli Ulli Hafner added a comment -

            After an upgrade from Hudson 1.395 to Jenkins 1.396 I also get this error: http://www.faktorzehn.org:8081/job/Hudson%20Plug-ins%20%28POM%29/10/console

            Show
            drulli Ulli Hafner added a comment - After an upgrade from Hudson 1.395 to Jenkins 1.396 I also get this error: http://www.faktorzehn.org:8081/job/Hudson%20Plug-ins%20%28POM%29/10/console
            Hide
            drulli Ulli Hafner added a comment -

            Note that I get this exception for freestyle or maven builds.

            Show
            drulli Ulli Hafner added a comment - Note that I get this exception for freestyle or maven builds.
            Hide
            drulli Ulli Hafner added a comment -

            Seems that this is related to the relative path bug:

                                if (FilenameUtils.separatorsToUnix(path).startsWith(FilenameUtils.normalize(mod.getRelativePath())))
            
            

            Seems, that mod.getRelativePath returns null.

            Show
            drulli Ulli Hafner added a comment - Seems that this is related to the relative path bug: if (FilenameUtils.separatorsToUnix(path).startsWith(FilenameUtils.normalize(mod.getRelativePath()))) Seems, that mod.getRelativePath returns null.
            Hide
            olamy olamy added a comment -

            fixed with JENKINS-8525
            can you check with master ?

            Show
            olamy olamy added a comment - fixed with JENKINS-8525 can you check with master ?
            Hide
            marco_rothe Marco Rothe added a comment -

            Still fails. See my comment at JENKINS-7684

            Show
            marco_rothe Marco Rothe added a comment - Still fails. See my comment at JENKINS-7684
            Hide
            marco_rothe Marco Rothe added a comment -

            The patch (see JENKINS-7684) was applied to the master 1.400-SNAPSHOT => so with the release of 1.400 it will become "public"

            Show
            marco_rothe Marco Rothe added a comment - The patch (see JENKINS-7684 ) was applied to the master 1.400-SNAPSHOT => so with the release of 1.400 it will become "public"
            Hide
            liya Liya Katz added a comment -

            Unfortunatelly, I get another error with Jenkins 1.400, while the build appears successful - see the log:

            [INFO] ------------------------------------------------------------------------
            [INFO] BUILD SUCCESSFUL
            [INFO] ------------------------------------------------------------------------
            [INFO] Total time: 86 minutes 26 seconds
            [INFO] Finished at: Wed Mar 09 11:48:17 IST 2011
            [INFO] Final Memory: 313M/877M
            [INFO] ------------------------------------------------------------------------
            Waiting for Jenkins to finish collecting data
            Sending e-mails to: XXX@ccccc.com YYY@cc.com
            Sending e-mails to: XXX@ccccc.com YYY@cc.com
            Sending e-mails to: XXX@ccccc.com YYY@cc.com
            channel stopped
            FATAL: null
            java.lang.NullPointerException
            at java.lang.String.startsWith(String.java:1421)
            at java.lang.String.startsWith(String.java:1450)
            at hudson.maven.MavenModuleSetBuild$1.isDescendantOf(MavenModuleSetBuild.java:233)
            at hudson.maven.MavenModuleSetBuild$1.<init>(MavenModuleSetBuild.java:202)
            at hudson.maven.MavenModuleSetBuild.getChangeSetFor(MavenModuleSetBuild.java:196)
            at hudson.maven.FilteredChangeLogSet.<init>(FilteredChangeLogSet.java:51)
            at hudson.maven.MavenBuild.getChangeSet(MavenBuild.java:173)
            at hudson.model.AbstractBuild.hasParticipant(AbstractBuild.java:319)
            at hudson.model.AbstractProject.hasParticipant(AbstractProject.java:1327)
            at hudson.model.User.getProjects(User.java:380)
            at hudson.scm.SubversionMailAddressResolverImpl.findMailAddressFor(SubversionMailAddressResolverImpl.java:20)
            at hudson.tasks.MailAddressResolver.resolve(MailAddressResolver.java:97)
            at hudson.tasks.Mailer$UserProperty.getAddress(Mailer.java:495)
            at hudson.tasks.MailSender.buildCulpritList(MailSender.java:383)
            at hudson.tasks.MailSender.createEmptyMail(MailSender.java:345)
            at hudson.tasks.MailSender.createUnstableMail(MailSender.java:180)
            at hudson.tasks.MailSender.getMail(MailSender.java:151)
            at hudson.tasks.MailSender.execute(MailSender.java:94)
            at hudson.maven.MavenModuleSetBuild$RunnerImpl.cleanUp(MavenModuleSetBuild.java:810)
            at hudson.model.Run.run(Run.java:1405)
            at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:432)
            at hudson.model.ResourceController.execute(ResourceController.java:88)
            at hudson.model.Executor.run(Executor.java:145)

            It looks like jenkins fails to get address of the one of the committers, while all the committers are valid users with email addresses - the Jenkins is configured to work with ActiveDirectory

            Show
            liya Liya Katz added a comment - Unfortunatelly, I get another error with Jenkins 1.400, while the build appears successful - see the log: [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------ [INFO] Total time: 86 minutes 26 seconds [INFO] Finished at: Wed Mar 09 11:48:17 IST 2011 [INFO] Final Memory: 313M/877M [INFO] ------------------------------------------------------------------------ Waiting for Jenkins to finish collecting data Sending e-mails to: XXX@ccccc.com YYY@cc.com Sending e-mails to: XXX@ccccc.com YYY@cc.com Sending e-mails to: XXX@ccccc.com YYY@cc.com channel stopped FATAL: null java.lang.NullPointerException at java.lang.String.startsWith(String.java:1421) at java.lang.String.startsWith(String.java:1450) at hudson.maven.MavenModuleSetBuild$1.isDescendantOf(MavenModuleSetBuild.java:233) at hudson.maven.MavenModuleSetBuild$1.<init>(MavenModuleSetBuild.java:202) at hudson.maven.MavenModuleSetBuild.getChangeSetFor(MavenModuleSetBuild.java:196) at hudson.maven.FilteredChangeLogSet.<init>(FilteredChangeLogSet.java:51) at hudson.maven.MavenBuild.getChangeSet(MavenBuild.java:173) at hudson.model.AbstractBuild.hasParticipant(AbstractBuild.java:319) at hudson.model.AbstractProject.hasParticipant(AbstractProject.java:1327) at hudson.model.User.getProjects(User.java:380) at hudson.scm.SubversionMailAddressResolverImpl.findMailAddressFor(SubversionMailAddressResolverImpl.java:20) at hudson.tasks.MailAddressResolver.resolve(MailAddressResolver.java:97) at hudson.tasks.Mailer$UserProperty.getAddress(Mailer.java:495) at hudson.tasks.MailSender.buildCulpritList(MailSender.java:383) at hudson.tasks.MailSender.createEmptyMail(MailSender.java:345) at hudson.tasks.MailSender.createUnstableMail(MailSender.java:180) at hudson.tasks.MailSender.getMail(MailSender.java:151) at hudson.tasks.MailSender.execute(MailSender.java:94) at hudson.maven.MavenModuleSetBuild$RunnerImpl.cleanUp(MavenModuleSetBuild.java:810) at hudson.model.Run.run(Run.java:1405) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:432) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:145) It looks like jenkins fails to get address of the one of the committers, while all the committers are valid users with email addresses - the Jenkins is configured to work with ActiveDirectory
            Hide
            marco_rothe Marco Rothe added a comment -

            Can you provide a sample project ?

            Show
            marco_rothe Marco Rothe added a comment - Can you provide a sample project ?
            Hide
            marco_rothe Marco Rothe added a comment -

            Mhhmm ... the patch for JENKINS-7684 didn't handle the case a path to normalize is already null ...
            Attached a new patch which fulfill the documentation of PomInfo#relativePath (Strings like "" (if this is the root), "abc", "foo/bar/zot").

            Show
            marco_rothe Marco Rothe added a comment - Mhhmm ... the patch for JENKINS-7684 didn't handle the case a path to normalize is already null ... Attached a new patch which fulfill the documentation of PomInfo#relativePath (Strings like "" (if this is the root), "abc", "foo/bar/zot").
            Hide
            marco_rothe Marco Rothe added a comment -

            @olamy: Maybe you can apply my new patch to the current master ?

            Show
            marco_rothe Marco Rothe added a comment - @olamy: Maybe you can apply my new patch to the current master ?
            Hide
            liya Liya Katz added a comment -

            I don't have a sample project - i have a huge multi-module maven project and this is where it fails.
            Now I also get the previous error (without any trace), same as for Hudson since 1.376:
            [INFO] ------------------------------------------------------------------------
            [INFO] BUILD SUCCESSFUL
            [INFO] ------------------------------------------------------------------------
            [INFO] Total time: 65 minutes 57 seconds
            [INFO] Finished at: Wed Mar 09 17:33:18 IST 2011
            [INFO] Final Memory: 280M/926M
            [INFO] ------------------------------------------------------------------------
            Sending e-mails to: CCC@NNN.com JJJ@NNN.com
            Sending e-mails to: CCC@NNN.com JJJ@NNN.com
            channel stopped
            FATAL: null
            java.lang.NullPointerException

            and the build appears successful.

            Show
            liya Liya Katz added a comment - I don't have a sample project - i have a huge multi-module maven project and this is where it fails. Now I also get the previous error (without any trace), same as for Hudson since 1.376: [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------ [INFO] Total time: 65 minutes 57 seconds [INFO] Finished at: Wed Mar 09 17:33:18 IST 2011 [INFO] Final Memory: 280M/926M [INFO] ------------------------------------------------------------------------ Sending e-mails to: CCC@NNN.com JJJ@NNN.com Sending e-mails to: CCC@NNN.com JJJ@NNN.com channel stopped FATAL: null java.lang.NullPointerException and the build appears successful.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Olivier Lamy
            Path:
            maven-plugin/src/main/java/hudson/maven/MavenModuleSetBuild.java
            http://jenkins-ci.org/commit/core/cc0113dafdd1e1c0048d9230eb91ab2b15fe0588
            Log:
            JENKINS-8436 Successful build ends with NPE
            Submitted by Marco Rothe

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Olivier Lamy Path: maven-plugin/src/main/java/hudson/maven/MavenModuleSetBuild.java http://jenkins-ci.org/commit/core/cc0113dafdd1e1c0048d9230eb91ab2b15fe0588 Log: JENKINS-8436 Successful build ends with NPE Submitted by Marco Rothe
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Olivier Lamy
            Path:
            maven-plugin/src/main/java/hudson/maven/MavenModuleSetBuild.java
            http://jenkins-ci.org/commit/core/cc0113dafdd1e1c0048d9230eb91ab2b15fe0588
            Log:
            JENKINS-8436 Successful build ends with NPE
            Submitted by Marco Rothe

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Olivier Lamy Path: maven-plugin/src/main/java/hudson/maven/MavenModuleSetBuild.java http://jenkins-ci.org/commit/core/cc0113dafdd1e1c0048d9230eb91ab2b15fe0588 Log: JENKINS-8436 Successful build ends with NPE Submitted by Marco Rothe
            Hide
            olamy olamy added a comment -

            patch pushed.
            Thanks !

            Show
            olamy olamy added a comment - patch pushed. Thanks !
            Hide
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #569
            JENKINS-8436 Successful build ends with NPE

            Olivier Lamy : cc0113dafdd1e1c0048d9230eb91ab2b15fe0588
            Files :

            • maven-plugin/src/main/java/hudson/maven/MavenModuleSetBuild.java
            Show
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #569 JENKINS-8436 Successful build ends with NPE Olivier Lamy : cc0113dafdd1e1c0048d9230eb91ab2b15fe0588 Files : maven-plugin/src/main/java/hudson/maven/MavenModuleSetBuild.java
            Hide
            marco_rothe Marco Rothe added a comment -

            @Liya Katz: Can you check with the latest master (checkout from git) if your kind of huge multi-module maven project build completely successful with the new patch applied?

            With the release of 1.402 it will become public.

            Show
            marco_rothe Marco Rothe added a comment - @Liya Katz: Can you check with the latest master (checkout from git ) if your kind of huge multi-module maven project build completely successful with the new patch applied? With the release of 1.402 it will become public.
            Hide
            olamy olamy added a comment -

            for testing I have pushed a war here : http://people.apache.org/~olamy/jenkins/

            Show
            olamy olamy added a comment - for testing I have pushed a war here : http://people.apache.org/~olamy/jenkins/
            Hide
            liya Liya Katz added a comment -

            Seems like the test war does the job! Thanks for the patch. I will run more tests with different jobs.
            When will be released officially?

            Show
            liya Liya Katz added a comment - Seems like the test war does the job! Thanks for the patch. I will run more tests with different jobs. When will be released officially?
            Hide
            olamy olamy added a comment -

            in 1.402

            Show
            olamy olamy added a comment - in 1.402
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Olivier Lamy
            Path:
            maven-plugin/src/main/java/hudson/maven/MavenModuleSetBuild.java
            http://jenkins-ci.org/commit/jenkins/c0643de268125c766e79b96087a0df357bc49576
            Log:
            JENKINS-8436 Successful build ends with NPE
            Submitted by Marco Rothe

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Olivier Lamy Path: maven-plugin/src/main/java/hudson/maven/MavenModuleSetBuild.java http://jenkins-ci.org/commit/jenkins/c0643de268125c766e79b96087a0df357bc49576 Log: JENKINS-8436 Successful build ends with NPE Submitted by Marco Rothe
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Olivier Lamy
            Path:
            src/main/java/hudson/maven/MavenModuleSetBuild.java
            http://jenkins-ci.org/commit/maven-plugin/a5ec140e4a03eb1d48fd98b5b41e1fbab6a355a4
            Log:
            JENKINS-8436 Successful build ends with NPE
            Submitted by Marco Rothe

            Originally-Committed-As: cc0113dafdd1e1c0048d9230eb91ab2b15fe0588

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Olivier Lamy Path: src/main/java/hudson/maven/MavenModuleSetBuild.java http://jenkins-ci.org/commit/maven-plugin/a5ec140e4a03eb1d48fd98b5b41e1fbab6a355a4 Log: JENKINS-8436 Successful build ends with NPE Submitted by Marco Rothe Originally-Committed-As: cc0113dafdd1e1c0048d9230eb91ab2b15fe0588

              People

              • Assignee:
                olamy olamy
                Reporter:
                liyatikal liyatikal
              • Votes:
                4 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: