java.lang.NullPointerException

Jenkins JIRA | Martin Hulth | 2 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. Speed up your debug routine!

    Automated exception search integrated into your IDE

  2. 0

    Strange SCM polling failure

    Google Groups | 4 years ago | Major P├ęter
    java.lang.NullPointerException
  3. 0

    When a build job is changed to use a new build node, and also the previously used node is removed from the Jenkins setup, then SCM polling starts to fail with: {noformat} ERROR: Failed to record SCM polling for hudson.model.FreeStyleProject@587918[jobName] java.lang.NullPointerException at hudson.plugins.zentimestamp.ZenTimestampEnvironmentContributor.buildEnvironmentFor(ZenTimestampEnvironmentContributor.java:37) at hudson.model.Run.getEnvironment(Run.java:2045) at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:931) at hudson.scm.SubversionSCM.compareRemoteRevisionWith(SubversionSCM.java:1230) at hudson.scm.SCM._compareRemoteRevisionWith(SCM.java:356) at hudson.scm.SCM.poll(SCM.java:373) at hudson.model.AbstractProject._poll(AbstractProject.java:1521) at hudson.model.AbstractProject.poll(AbstractProject.java:1446) at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:439) at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:468) at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) {noformat} This is because AbstractBuild#getBuiltOn may return null, but this case is not handled in hudson.plugins.zentimestamp.ZenTimestampEnvironmentContributor#buildEnvironmentFor. See http://javadoc.jenkins-ci.org/hudson/model/AbstractBuild.html#getBuiltOn() for reference.

    Jenkins JIRA | 4 years ago | aldaris
    java.lang.NullPointerException

    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.zentimestamp.ZenTimestampEnvironmentContributor.buildEnvironmentFor()
    2. hudson.plugins.zentimestamp
      ZenTimestampEnvironmentContributor.buildEnvironmentFor
      1. hudson.plugins.zentimestamp.ZenTimestampEnvironmentContributor.buildEnvironmentFor(ZenTimestampEnvironmentContributor.java:57)
      1 frame
    3. Hudson
      AbstractBuild.getEnvironment
      1. hudson.model.Run.getEnvironment(Run.java:2248)
      2. hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:935)
      2 frames
    4. org.jenkinsci.plugins
      PerforceScm.checkout
      1. org.jenkinsci.plugins.p4.tagging.TagAction.<init>(TagAction.java:40)
      2. org.jenkinsci.plugins.p4.PerforceScm.checkout(PerforceScm.java:282)
      2 frames
    5. Hudson
      AbstractBuild$AbstractBuildExecution.defaultCheckout
      1. hudson.scm.SCM.checkout(SCM.java:485)
      2. hudson.model.AbstractProject.checkout(AbstractProject.java:1276)
      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.run
      1. hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:532)
      2. hudson.model.Run.execute(Run.java:1744)
      3. hudson.model.Run.run(Run.java:1682)
      3 frames
    8. com.cloudbees.plugins
      FlowRun.run
      1. com.cloudbees.plugins.flow.FlowRun.run(FlowRun.java:153)
      1 frame
    9. Hudson
      Executor.run
      1. hudson.model.ResourceController.execute(ResourceController.java:98)
      2. hudson.model.Executor.run(Executor.java:374)
      2 frames