java.lang.NullPointerException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • 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}
    via by Dan C,
  • 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}
    via by Dan C,
  • Gerrit Trigger - Jenkins - Jenkins Wiki
    via by Unknown author,
    • 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)
    No Bugmate found.