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

java.lang.NullPointerException at end of successful build preventing downstream jobs

    XMLWordPrintable

    Details

    • Similar Issues:
    • Released As:
      Jenkins 2.163

      Description

      I have a Freestyle project job which has been working for over 40 runs but now gets the error below at the end of each build.  I have created another job copying the configuration of this one and it runs without getting the error.  This error stops the trigger of downstream jobs but doesn't appear to hurt anything in the build itself. I have not updated or installed anything recently that could account for this.

       
      Archiving artifacts
      FATAL: null
      java.lang.NullPointerException
      at hudson.model.RunParameterDefinition.getDefaultParameterValue(RunParameterDefinition.java:174)
      at jenkins.model.ParameterizedJobMixIn.getDefaultParametersValues(ParameterizedJobMixIn.java:171)
      at jenkins.model.ParameterizedJobMixIn.scheduleBuild2(ParameterizedJobMixIn.java:153)
      at jenkins.model.ParameterizedJobMixIn.scheduleBuild2(ParameterizedJobMixIn.java:122)
      at jenkins.model.ParameterizedJobMixIn$ParameterizedJob.scheduleBuild2(ParameterizedJobMixIn.java:417)
      at hudson.model.AbstractProject.scheduleBuild2(AbstractProject.java:852)
      at hudson.model.AbstractProject.scheduleBuild2(AbstractProject.java:824)
      at hudson.model.AbstractProject.scheduleBuild2(AbstractProject.java:807)
      at hudson.model.AbstractProject.scheduleBuild(AbstractProject.java:795)
      at hudson.tasks.BuildTrigger.execute(BuildTrigger.java:278)
      at hudson.model.AbstractBuild$AbstractBuildExecution.cleanUp(AbstractBuild.java:643)
      at hudson.model.Build$BuildExecution.cleanUp(Build.java:201)
      at hudson.model.Run.execute(Run.java:1784)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:97)
      at hudson.model.Executor.run(Executor.java:421)
      Finished: SUCCESS

        Attachments

          Activity

          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          From what I see, it is a defect in the core. RunParameterDefinition#getProject() may return null, and this is not checked in the calling logic of getDefaultParameterValue(). Sounds it's easy to at least add proper null checks.

          Show
          oleg_nenashev Oleg Nenashev added a comment - From what I see, it is a defect in the core. RunParameterDefinition#getProject() may return null, and this is not checked in the calling logic of getDefaultParameterValue(). Sounds it's easy to at least add proper null checks.
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          OTOH it is not a regression. The code has not been modified for years

          Show
          oleg_nenashev Oleg Nenashev added a comment - OTOH it is not a regression. The code has not been modified for years
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          The potential culprit is installation of AuthorizeProject on the instance, which may impact this default value retrieval.

          Show
          oleg_nenashev Oleg Nenashev added a comment - The potential culprit is installation of AuthorizeProject on the instance, which may impact this default value retrieval.
          Hide
          jmckinnon Joshua McKinnon added a comment -

          Why would that only affect this one configuration and not the copy of it?

          Show
          jmckinnon Joshua McKinnon added a comment - Why would that only affect this one configuration and not the copy of it?
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          The fix was released in Jenkins 2.163

          Show
          oleg_nenashev Oleg Nenashev added a comment - The fix was released in Jenkins 2.163

            People

            • Assignee:
              Unassigned
              Reporter:
              jmckinnon Joshua McKinnon
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: