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

java.lang.NullPointerException com.tikal.jenkins.plugins.multijob.MultiJobBuilder.getScmChange(MultiJobBuilder.java:168)

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      There was a null pointer exception on line 168 of com.tikal.jenkins.plugins.multijob.MultiJobBuilder. Look at the line at HEAD infers that lastbuild.getResult() is not being checked if null L168 . http://javadoc.jenkins-ci.org/hudson/model/Run.html#getResult() implies that this will return null at some stage. Please put a null check before using lastbuild.getResult().

        Attachments

          Issue Links

            Activity

            Hide
            shplorf Greg Malkov added a comment - - edited

            Yep, also running into this, Jenkins v2.33, MultiJob v1.23

            Show
            shplorf Greg Malkov added a comment - - edited Yep, also running into this, Jenkins v2.33, MultiJob v1.23
            Hide
            rk R K added a comment -

            This particular NPE is fixed in 1.24.

            Show
            rk R K added a comment - This particular NPE is fixed in 1.24.
            Hide
            rk R K added a comment -

            Nevertheless, if the intention is to trigger the build if the previous build is still running, then it should use lastBuild.isBuilding() first. If that is true, trigger. If not, then getResult() will be != null. It might be worth to create a separate message for that.

            Show
            rk R K added a comment - Nevertheless, if the intention is to trigger the build if the previous build is still running, then it should use lastBuild.isBuilding() first. If that is true, trigger. If not, then getResult() will be != null. It might be worth to create a separate message for that.
            Hide
            jbochenski Jakub Bochenski added a comment -

            The stack trace for 1.27 is

            12:34:02 java.lang.NullPointerException
            12:34:02 	at com.tikal.jenkins.plugins.multijob.MultiJobBuilder.getScmChange(MultiJobBuilder.java:178)
            12:34:02 	at com.tikal.jenkins.plugins.multijob.MultiJobBuilder.perform(MultiJobBuilder.java:269)
            12:34:02 	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
            12:34:02 	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:735)
            12:34:02 	at hudson.model.Build$BuildExecution.build(Build.java:206)
            12:34:02 	at hudson.model.Build$BuildExecution.doRun(Build.java:163)
            12:34:02 	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:490)
            12:34:02 	at com.tikal.jenkins.plugins.multijob.MultiJobBuild$MultiJobRunnerImpl.run(MultiJobBuild.java:136)
            12:34:02 	at hudson.model.Run.execute(Run.java:1735)
            12:34:02 	at com.tikal.jenkins.plugins.multijob.MultiJobBuild.run(MultiJobBuild.java:73)
            12:34:02 	at hudson.model.ResourceController.execute(ResourceController.java:97)
            12:34:02 	at hudson.model.Executor.run(Executor.java:405)
            Show
            jbochenski Jakub Bochenski added a comment - The stack trace for 1.27 is 12:34:02 java.lang.NullPointerException 12:34:02 at com.tikal.jenkins.plugins.multijob.MultiJobBuilder.getScmChange(MultiJobBuilder.java:178) 12:34:02 at com.tikal.jenkins.plugins.multijob.MultiJobBuilder.perform(MultiJobBuilder.java:269) 12:34:02 at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) 12:34:02 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:735) 12:34:02 at hudson.model.Build$BuildExecution.build(Build.java:206) 12:34:02 at hudson.model.Build$BuildExecution.doRun(Build.java:163) 12:34:02 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:490) 12:34:02 at com.tikal.jenkins.plugins.multijob.MultiJobBuild$MultiJobRunnerImpl.run(MultiJobBuild.java:136) 12:34:02 at hudson.model.Run.execute(Run.java:1735) 12:34:02 at com.tikal.jenkins.plugins.multijob.MultiJobBuild.run(MultiJobBuild.java:73) 12:34:02 at hudson.model.ResourceController.execute(ResourceController.java:97) 12:34:02 at hudson.model.Executor.run(Executor.java:405)
            Hide
            mikami Michał Mirosław added a comment -

            Stack trace for 1.30:

            java.lang.NullPointerException
            	at com.tikal.jenkins.plugins.multijob.MultiJobBuilder.getScmChange(MultiJobBuilder.java:193)
            	at com.tikal.jenkins.plugins.multijob.MultiJobBuilder.perform(MultiJobBuilder.java:291)
            	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
            	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
            	at hudson.model.Build$BuildExecution.build(Build.java:206)
            	at hudson.model.Build$BuildExecution.doRun(Build.java:163)
            	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
            	at com.tikal.jenkins.plugins.multijob.MultiJobBuild$MultiJobRunnerImpl.run(MultiJobBuild.java:148)
            	at hudson.model.Run.execute(Run.java:1815)
            	at com.tikal.jenkins.plugins.multijob.MultiJobBuild.run(MultiJobBuild.java:76)
            	at hudson.model.ResourceController.execute(ResourceController.java:97)
            	at hudson.model.Executor.run(Executor.java:429)
            Show
            mikami Michał Mirosław added a comment - Stack trace for 1.30: java.lang.NullPointerException at com.tikal.jenkins.plugins.multijob.MultiJobBuilder.getScmChange(MultiJobBuilder.java:193) at com.tikal.jenkins.plugins.multijob.MultiJobBuilder.perform(MultiJobBuilder.java:291) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744) at hudson.model.Build$BuildExecution.build(Build.java:206) at hudson.model.Build$BuildExecution.doRun(Build.java:163) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504) at com.tikal.jenkins.plugins.multijob.MultiJobBuild$MultiJobRunnerImpl.run(MultiJobBuild.java:148) at hudson.model.Run.execute(Run.java:1815) at com.tikal.jenkins.plugins.multijob.MultiJobBuild.run(MultiJobBuild.java:76) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:429)

              People

              • Assignee:
                Unassigned
                Reporter:
                lswith Luke Swithenbank
              • Votes:
                6 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated: