java.lang.NullPointerException

Jenkins JIRA | Cezariusz Marek | 1 year ago
  1. 0

    I have configured a job to verify Gerrit changes, but it fails with NPE. Here's the log: {noformat} Triggered by Gerrit: http://jerry:3881/104 Building in workspace /var/lib/tomcat/.jenkins/workspace/gerrit-sdm-backend Cloning the remote Git repository Cloning repository http://jerry:3881/sdm/sdm-backend > git init /var/lib/tomcat/.jenkins/workspace/gerrit-sdm-backend # timeout=10 Fetching upstream changes from http://jerry:3881/sdm/sdm-backend > git --version # timeout=10 > git -c core.askpass=true fetch --tags --progress http://jerry:3881/sdm/sdm-backend +refs/heads/*:refs/remotes/origin/* > git config remote.origin.url http://jerry:3881/sdm/sdm-backend # timeout=10 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10 > git config remote.origin.url http://jerry:3881/sdm/sdm-backend # timeout=10 Fetching upstream changes from http://jerry:3881/sdm/sdm-backend > git -c core.askpass=true fetch --tags --progress http://jerry:3881/sdm/sdm-backend refs/changes/04/104/3 > git rev-parse 14428cdafcdc87c4f6b3fdd87ad1344d3cd8be33^{commit} # timeout=10 Checking out Revision 14428cdafcdc87c4f6b3fdd87ad1344d3cd8be33 () > git config core.sparsecheckout # timeout=10 > git checkout -f 14428cdafcdc87c4f6b3fdd87ad1344d3cd8be33 FATAL: null java.lang.NullPointerException at java.util.TreeMap.compare(TreeMap.java:1188) at java.util.TreeMap.put(TreeMap.java:531) at hudson.util.CopyOnWriteMap.put(CopyOnWriteMap.java:104) at hudson.plugins.git.GitTagAction.<init>(GitTagAction.java:44) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1066) at hudson.scm.SCM.checkout(SCM.java:485) at hudson.model.AbstractProject.checkout(AbstractProject.java:1277) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:610) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:532) at hudson.model.Run.execute(Run.java:1741) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:408) Finished: FAILURE {noformat} git version 2.5.3

    Jenkins JIRA | 1 year ago | Cezariusz Marek
    java.lang.NullPointerException
  2. 0

    I have configured a job to verify Gerrit changes, but it fails with NPE. Here's the log: {noformat} Triggered by Gerrit: http://jerry:3881/104 Building in workspace /var/lib/tomcat/.jenkins/workspace/gerrit-sdm-backend Cloning the remote Git repository Cloning repository http://jerry:3881/sdm/sdm-backend > git init /var/lib/tomcat/.jenkins/workspace/gerrit-sdm-backend # timeout=10 Fetching upstream changes from http://jerry:3881/sdm/sdm-backend > git --version # timeout=10 > git -c core.askpass=true fetch --tags --progress http://jerry:3881/sdm/sdm-backend +refs/heads/*:refs/remotes/origin/* > git config remote.origin.url http://jerry:3881/sdm/sdm-backend # timeout=10 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10 > git config remote.origin.url http://jerry:3881/sdm/sdm-backend # timeout=10 Fetching upstream changes from http://jerry:3881/sdm/sdm-backend > git -c core.askpass=true fetch --tags --progress http://jerry:3881/sdm/sdm-backend refs/changes/04/104/3 > git rev-parse 14428cdafcdc87c4f6b3fdd87ad1344d3cd8be33^{commit} # timeout=10 Checking out Revision 14428cdafcdc87c4f6b3fdd87ad1344d3cd8be33 () > git config core.sparsecheckout # timeout=10 > git checkout -f 14428cdafcdc87c4f6b3fdd87ad1344d3cd8be33 FATAL: null java.lang.NullPointerException at java.util.TreeMap.compare(TreeMap.java:1188) at java.util.TreeMap.put(TreeMap.java:531) at hudson.util.CopyOnWriteMap.put(CopyOnWriteMap.java:104) at hudson.plugins.git.GitTagAction.<init>(GitTagAction.java:44) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1066) at hudson.scm.SCM.checkout(SCM.java:485) at hudson.model.AbstractProject.checkout(AbstractProject.java:1277) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:610) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:532) at hudson.model.Run.execute(Run.java:1741) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:408) Finished: FAILURE {noformat} git version 2.5.3

    Jenkins JIRA | 1 year ago | Cezariusz Marek
    java.lang.NullPointerException
  3. 0

    Jenkins - NullPointerException when building

    Stack Overflow | 6 months ago | Dr. Jones
    java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    I'm getting the following error: {code:java} Building in workspace /var/lib/jenkins/jobs/delegate/workspace > git rev-parse --is-inside-work-tree # timeout=10 Fetching changes from the remote Git repository > git config remote.origin.url ssh://Jenkins@localhost:29418/delegate # timeout=10 Fetching upstream changes from ssh://Jenkins@localhost:29418/delegate > git --version # timeout=10 using GIT_SSH to set credentials > git -c core.askpass=true fetch --tags --progress ssh://Jenkins@localhost:29418/delegate refs/changes/*:refs/changes/* > git rev-parse FETCH_HEAD^{commit} # timeout=10 Checking out Revision e31eedc809f88c69ea6b5193e8a90e052421ec2d () > git config core.sparsecheckout # timeout=10 > git checkout -f e31eedc809f88c69ea6b5193e8a90e052421ec2d FATAL: null java.lang.NullPointerException at java.util.TreeMap.compare(TreeMap.java:1290) at java.util.TreeMap.put(TreeMap.java:538) at hudson.util.CopyOnWriteMap.put(CopyOnWriteMap.java:104) at hudson.plugins.git.GitTagAction.<init>(GitTagAction.java:44) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1143) at hudson.scm.SCM.checkout(SCM.java:485) at hudson.model.AbstractProject.checkout(AbstractProject.java:1275) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:610) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:532) at hudson.model.Run.execute(Run.java:1741) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:408) Finished: FAILURE {code} If i look inside the jenkins workspace everything looks good. If i run all the git commands manually it also checkouts the correct commit but everything crashes after that. *Config:* Source code management: Git Repositories: ssh://Jenkins@localhost:29418/delegate Credentials: Jenkins Name: *empty* Refspec: refs/changes/*:refs/changes/* Branches to build: ** Strategy for choosing what to build: Gerrit Trigger Build triggers: Gerrit event Choose a Server: gerrit Gerrit project: type = plain, Pattern = delegate branches type = Path, Pattern = ** *Interesting:* If i change the refspec to something else or leave it bland the build will success but the latest changes won't be checked out from gerrit. So is there a solution to this problem or am I doing something wrong?

    Jenkins JIRA | 6 months ago | nilo swe
    java.lang.NullPointerException
  6. 0

    I'm getting the following error: {code:java} Building in workspace /var/lib/jenkins/jobs/delegate/workspace > git rev-parse --is-inside-work-tree # timeout=10 Fetching changes from the remote Git repository > git config remote.origin.url ssh://Jenkins@localhost:29418/delegate # timeout=10 Fetching upstream changes from ssh://Jenkins@localhost:29418/delegate > git --version # timeout=10 using GIT_SSH to set credentials > git -c core.askpass=true fetch --tags --progress ssh://Jenkins@localhost:29418/delegate refs/changes/*:refs/changes/* > git rev-parse FETCH_HEAD^{commit} # timeout=10 Checking out Revision e31eedc809f88c69ea6b5193e8a90e052421ec2d () > git config core.sparsecheckout # timeout=10 > git checkout -f e31eedc809f88c69ea6b5193e8a90e052421ec2d FATAL: null java.lang.NullPointerException at java.util.TreeMap.compare(TreeMap.java:1290) at java.util.TreeMap.put(TreeMap.java:538) at hudson.util.CopyOnWriteMap.put(CopyOnWriteMap.java:104) at hudson.plugins.git.GitTagAction.<init>(GitTagAction.java:44) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1143) at hudson.scm.SCM.checkout(SCM.java:485) at hudson.model.AbstractProject.checkout(AbstractProject.java:1275) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:610) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:532) at hudson.model.Run.execute(Run.java:1741) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:408) Finished: FAILURE {code} If i look inside the jenkins workspace everything looks good. If i run all the git commands manually it also checkouts the correct commit but everything crashes after that. *Config:* Source code management: Git Repositories: ssh://Jenkins@localhost:29418/delegate Credentials: Jenkins Name: *empty* Refspec: refs/changes/*:refs/changes/* Branches to build: ** Strategy for choosing what to build: Gerrit Trigger Build triggers: Gerrit event Choose a Server: gerrit Gerrit project: type = plain, Pattern = delegate branches type = Path, Pattern = ** *Interesting:* If i change the refspec to something else or leave it bland the build will success but the latest changes won't be checked out from gerrit. So is there a solution to this problem or am I doing something wrong?

    Jenkins JIRA | 6 months ago | nilo swe
    java.lang.NullPointerException

  1. aldrinleal 2 times, last 2 months ago
1 unregistered visitors
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 java.util.TreeMap.compare()
  2. Java RT
    TreeMap.put
    1. java.util.TreeMap.compare(TreeMap.java:1188)
    2. java.util.TreeMap.put(TreeMap.java:531)
    2 frames
  3. Hudson
    CopyOnWriteMap.put
    1. hudson.util.CopyOnWriteMap.put(CopyOnWriteMap.java:104)
    1 frame
  4. Hudson GIT plugin
    GitSCM.checkout
    1. hudson.plugins.git.GitTagAction.<init>(GitTagAction.java:44)
    2. hudson.plugins.git.GitSCM.checkout(GitSCM.java:1066)
    2 frames
  5. Hudson
    AbstractBuild$AbstractBuildExecution.defaultCheckout
    1. hudson.scm.SCM.checkout(SCM.java:485)
    2. hudson.model.AbstractProject.checkout(AbstractProject.java:1277)
    3. hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:610)
    3 frames
  6. jenkins.scm
    SCMCheckoutStrategy.checkout
    1. jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
    1 frame
  7. Hudson
    Run.execute
    1. hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:532)
    2. hudson.model.Run.execute(Run.java:1741)
    2 frames
  8. Hudson Maven Embedder
    MavenModuleSetBuild.run
    1. hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531)
    1 frame
  9. Hudson
    Executor.run
    1. hudson.model.ResourceController.execute(ResourceController.java:98)
    2. hudson.model.Executor.run(Executor.java:408)
    2 frames