java.lang.NullPointerException

Jenkins JIRA | Dan C | 2 years ago
  1. 0

    Job is configured to use Git with Gerrit Trigger choosing strategy. Remote name is gerrit, refspec is: {{+refs/heads/*:refs/remotes/gerrit/* $GERRIT_REFSPEC}}. Configured to merge with {{$GERRIT_BRANCH}} and calculate changelog against {{$GERRIT_BRANCH}}. When using the Gerrit Trigger choosing strategy, "branches to build" is meaningless, so I left it at the default "**". However that causes the following NPE. Changing the "branches to build" to a valid branch name like "master" fixes the problem. {code} Retriggered by user dcallagh for Gerrit: http://gerrit.beaker-project.org/4092 in silent mode. [EnvInject] - Loading node environment variables. Building in workspace /var/lib/jenkins/jobs/restraint-review-checks/workspace selected Git installation does not exists. Using Default > git rev-parse --is-inside-work-tree # timeout=10 Fetching changes from the remote Git repository > git config remote.gerrit.url ssh://jenkins@gerrit.beaker-project.org:29418/restraint # timeout=10 Fetching upstream changes from ssh://jenkins@gerrit.beaker-project.org:29418/restraint > git --version # timeout=10 using GIT_SSH to set credentials > git -c core.askpass=true fetch --tags --progress ssh://jenkins@gerrit.beaker-project.org:29418/restraint +refs/heads/*:refs/remotes/gerrit/* refs/changes/92/4092/1 > git rev-parse 918d97ecf9cf9fac9ff26a15531e975bde64f4ed^{commit} # timeout=10 FATAL: null java.lang.NullPointerException at hudson.plugins.git.Revision.containsBranchName(Revision.java:104) at hudson.plugins.git.extensions.impl.PreBuildMerge.decorateRevisionToBuild(PreBuildMerge.java:57) at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:925) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1017) at hudson.scm.SCM.checkout(SCM.java:484) at hudson.model.AbstractProject.checkout(AbstractProject.java:1270) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:609) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:531) at hudson.model.Run.execute(Run.java:1751) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:89) at hudson.model.Executor.run(Executor.java:240) Finished: FAILURE {code}

    Jenkins JIRA | 2 years ago | Dan C
    java.lang.NullPointerException
  2. 0

    Job is configured to use Git with Gerrit Trigger choosing strategy. Remote name is gerrit, refspec is: {{+refs/heads/*:refs/remotes/gerrit/* $GERRIT_REFSPEC}}. Configured to merge with {{$GERRIT_BRANCH}} and calculate changelog against {{$GERRIT_BRANCH}}. When using the Gerrit Trigger choosing strategy, "branches to build" is meaningless, so I left it at the default "**". However that causes the following NPE. Changing the "branches to build" to a valid branch name like "master" fixes the problem. {code} Retriggered by user dcallagh for Gerrit: http://gerrit.beaker-project.org/4092 in silent mode. [EnvInject] - Loading node environment variables. Building in workspace /var/lib/jenkins/jobs/restraint-review-checks/workspace selected Git installation does not exists. Using Default > git rev-parse --is-inside-work-tree # timeout=10 Fetching changes from the remote Git repository > git config remote.gerrit.url ssh://jenkins@gerrit.beaker-project.org:29418/restraint # timeout=10 Fetching upstream changes from ssh://jenkins@gerrit.beaker-project.org:29418/restraint > git --version # timeout=10 using GIT_SSH to set credentials > git -c core.askpass=true fetch --tags --progress ssh://jenkins@gerrit.beaker-project.org:29418/restraint +refs/heads/*:refs/remotes/gerrit/* refs/changes/92/4092/1 > git rev-parse 918d97ecf9cf9fac9ff26a15531e975bde64f4ed^{commit} # timeout=10 FATAL: null java.lang.NullPointerException at hudson.plugins.git.Revision.containsBranchName(Revision.java:104) at hudson.plugins.git.extensions.impl.PreBuildMerge.decorateRevisionToBuild(PreBuildMerge.java:57) at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:925) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1017) at hudson.scm.SCM.checkout(SCM.java:484) at hudson.model.AbstractProject.checkout(AbstractProject.java:1270) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:609) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:531) at hudson.model.Run.execute(Run.java:1751) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:89) at hudson.model.Executor.run(Executor.java:240) Finished: FAILURE {code}

    Jenkins JIRA | 2 years ago | Dan C
    java.lang.NullPointerException
  3. 0

    Android: Saving Map State in Google map

    Stack Overflow | 11 months ago | Junie Negentien
    java.lang.RuntimeException: Unable to resume activity {com.ourThesis.junieNegentien2015/com.ourThesis.junieNegentien2015.MainActivity}: java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at hudson.plugins.git.Revision.containsBranchName()
    2. Hudson GIT plugin
      Revision.containsBranchName
      1. hudson.plugins.git.Revision.containsBranchName(Revision.java:104)
      1 frame
    3. hudson.plugins.git
      PreBuildMerge.decorateRevisionToBuild
      1. hudson.plugins.git.extensions.impl.PreBuildMerge.decorateRevisionToBuild(PreBuildMerge.java:57)
      1 frame
    4. Hudson GIT plugin
      GitSCM.checkout
      1. hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:925)
      2. hudson.plugins.git.GitSCM.checkout(GitSCM.java:1017)
      2 frames
    5. Hudson
      AbstractBuild$AbstractBuildExecution.defaultCheckout
      1. hudson.scm.SCM.checkout(SCM.java:484)
      2. hudson.model.AbstractProject.checkout(AbstractProject.java:1270)
      3. hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:609)
      3 frames
    6. jenkins.scm
      SCMCheckoutStrategy.checkout
      1. jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
      1 frame
    7. Hudson
      Executor.run
      1. hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:531)
      2. hudson.model.Run.execute(Run.java:1751)
      3. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      4. hudson.model.ResourceController.execute(ResourceController.java:89)
      5. hudson.model.Executor.run(Executor.java:240)
      5 frames