java.lang.NullPointerException

Jenkins JIRA | Yoann Dubreuil | 1 year ago
  1. 0

    When a job is using an automatically installed JDK and when the JDK is not available yet on build node, this NPE is thrown: {code} ERROR: java.lang.NullPointerException java.lang.NullPointerException at hudson.Launcher$ProcStarter.stdout(Launcher.java:262) at hudson.tools.AbstractCommandInstaller.performInstallation(AbstractCommandInstaller.java:77) at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:68) at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:107) at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:205) at hudson.model.JDK.forNode(JDK.java:130) at hudson.model.AbstractProject.getEnvironment(AbstractProject.java:355) at hudson.model.Run.getEnvironment(Run.java:2228) at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:932) at org.jvnet.hudson.tools.versionnumber.VersionNumberBuilder.getPreviousBuildWithVersionNumber(VersionNumberBuilder.java:204) at org.jvnet.hudson.tools.versionnumber.VersionNumberBuilder.incBuild(VersionNumberBuilder.java:242) at org.jvnet.hudson.tools.versionnumber.VersionNumberBuilder.setUp(VersionNumberBuilder.java:497) at hudson.model.Build$BuildExecution.doRun(Build.java:154) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:536) at hudson.model.Run.execute(Run.java:1738) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:381) {code} Plugin is calling {{build.getEnvironment(null)}} [here|https://github.com/jenkinsci/versionnumber-plugin/blob/master/src/main/java/org/jvnet/hudson/tools/versionnumber/VersionNumberBuilder.java#L204]. Passing {{null}} doesn't seem to be legal.

    Jenkins JIRA | 1 year ago | Yoann Dubreuil
    java.lang.NullPointerException
  2. 0

    When a job is using an automatically installed JDK and when the JDK is not available yet on build node, this NPE is thrown: {code} ERROR: java.lang.NullPointerException java.lang.NullPointerException at hudson.Launcher$ProcStarter.stdout(Launcher.java:262) at hudson.tools.AbstractCommandInstaller.performInstallation(AbstractCommandInstaller.java:77) at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:68) at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:107) at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:205) at hudson.model.JDK.forNode(JDK.java:130) at hudson.model.AbstractProject.getEnvironment(AbstractProject.java:355) at hudson.model.Run.getEnvironment(Run.java:2228) at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:932) at org.jvnet.hudson.tools.versionnumber.VersionNumberBuilder.getPreviousBuildWithVersionNumber(VersionNumberBuilder.java:204) at org.jvnet.hudson.tools.versionnumber.VersionNumberBuilder.incBuild(VersionNumberBuilder.java:242) at org.jvnet.hudson.tools.versionnumber.VersionNumberBuilder.setUp(VersionNumberBuilder.java:497) at hudson.model.Build$BuildExecution.doRun(Build.java:154) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:536) at hudson.model.Run.execute(Run.java:1738) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:381) {code} Plugin is calling {{build.getEnvironment(null)}} [here|https://github.com/jenkinsci/versionnumber-plugin/blob/master/src/main/java/org/jvnet/hudson/tools/versionnumber/VersionNumberBuilder.java#L204]. Passing {{null}} doesn't seem to be legal.

    Jenkins JIRA | 1 year ago | Yoann Dubreuil
    java.lang.NullPointerException
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    happened after upgrade to 2.2.0 Oct 9, 2010 11:32:30 AM com.sonyericsson.hudson.plugins.gerrit.trigger.gerritnotifier.ParameterExpander expandParameters SEVERE: Failed to expand env vars into gerrit cmd. Gerrit won't be notified!! java.lang.NullPointerException at hudson.model.Run.getEnvironment(Run.java:1680) at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:682) at com.sonyericsson.hudson.plugins.gerrit.trigger.gerritnotifier.ParameterExpander.expandParameters(ParameterExpander.java:210) at com.sonyericsson.hudson.plugins.gerrit.trigger.gerritnotifier.ParameterExpander.getBuildStartedCommand(ParameterExpander.java:96) at com.sonyericsson.hudson.plugins.gerrit.trigger.gerritnotifier.GerritNotifier.buildStarted(GerritNotifier.java:79) at com.sonyericsson.hudson.plugins.gerrit.trigger.gerritnotifier.job.BuildStartedCommandJob.run(BuildStartedCommandJob.java:72) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:636) Oct 9, 2010 11:32:30 AM com.sonyericsson.hudson.plugins.gerrit.trigger.gerritnotifier.GerritNotifier buildStarted SEVERE: Something wrong during parameter extraction. Gerrit will not be notified of BuildStarted

    Jenkins JIRA | 6 years ago | Kevin Cai
    java.lang.NullPointerException
  5. 0

    After upgrading to Hudson 1.379 and ClearCase 1.3.1, our polling is no longer working. We have an environment variable in our view names (to shorten our often-verbose computernames). For some of the polling commands, the resolution is working fine. You can see that in the command output the SHORT_COMPUTERNAME variable has been resolved properly form the lsview command. Started on Oct 26, 2010 10:05:51 AM [dev] $ cleartool desc -fmt %[found_bls]Xp\n stream:Core_6.5_Int@\WFX_PVOB baseline:Core_64_ML_1_13_2010__seed_6.5@\WFX_PVOB [dev] $ cleartool desc -fmt %[component]Xp\n baseline:Core_64_ML_1_13_2010__seed_6.5@\WFX_PVOB component:core@\WFX_PVOB [dev] $ cleartool lsview ${SHORT_COMPUTERNAME}_core_6.5 H-076908_core_6.5 \\SUMSHAH-076908\ccstg_c\H-076908_core_6.5.vws [${SHORT_COMPUTERNAME}_core_6.5] $ cleartool lshistory -all -since 26-oct-10.12:05:51utc+0000 -fmt '\"%Nd\" \"%u\" \"%En\" \"%Vn\" \"%e\" \"%o\" \"%[activity]p\" \n%c\n' -branch brtype:Core_6.5_Int -nco WFX_Core\core [dev] $ cleartool desc -fmt %[found_bls]Xp\n stream:Core_6.5_Int@\WFX_PVOB baseline:Core_64_ML_1_13_2010__seed_6.5@\WFX_PVOB [dev] $ cleartool desc -fmt %[component]Xp\n baseline:Core_64_ML_1_13_2010__seed_6.5@\WFX_PVOB component:core@\WFX_PVOB Done. Took 1 sec No changes But we're seeing this in our hudson.err.log at each polling interval: Oct 25, 2010 1:00:51 PM hudson.plugins.clearcase.util.BuildVariableResolver resolve WARNING: Variable name 'SHORT_COMPUTERNAME' look up failed java.lang.NullPointerException at hudson.model.Run.getEnvironment(Run.java:1680) at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:682) at hudson.plugins.clearcase.util.BuildVariableResolver.resolve(BuildVariableResolver.java:116) at hudson.plugins.clearcase.util.BuildVariableResolver.resolve(BuildVariableResolver.java:58) at hudson.Util.replaceMacro(Util.java:174) at hudson.plugins.clearcase.AbstractClearCaseScm.getViewName(AbstractClearCaseScm.java:307) at hudson.plugins.clearcase.AbstractClearCaseScm.compareRemoteRevisionWith(AbstractClearCaseScm.java:537) at hudson.scm.SCM._compareRemoteRevisionWith(SCM.java:353) at hudson.scm.SCM.poll(SCM.java:370) at hudson.model.AbstractProject.poll(AbstractProject.java:1195) at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:417) at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:446) at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)

    Jenkins JIRA | 6 years ago | dhauslad
    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.Launcher$ProcStarter.stdout()
    2. Hudson
      AbstractBuild.getEnvironment
      1. hudson.Launcher$ProcStarter.stdout(Launcher.java:262)
      2. hudson.tools.AbstractCommandInstaller.performInstallation(AbstractCommandInstaller.java:77)
      3. hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:68)
      4. hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:107)
      5. hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:205)
      6. hudson.model.JDK.forNode(JDK.java:130)
      7. hudson.model.AbstractProject.getEnvironment(AbstractProject.java:355)
      8. hudson.model.Run.getEnvironment(Run.java:2228)
      9. hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:932)
      9 frames
    3. org.jvnet.hudson
      VersionNumberBuilder.setUp
      1. org.jvnet.hudson.tools.versionnumber.VersionNumberBuilder.getPreviousBuildWithVersionNumber(VersionNumberBuilder.java:204)
      2. org.jvnet.hudson.tools.versionnumber.VersionNumberBuilder.incBuild(VersionNumberBuilder.java:242)
      3. org.jvnet.hudson.tools.versionnumber.VersionNumberBuilder.setUp(VersionNumberBuilder.java:497)
      3 frames
    4. Hudson
      Executor.run
      1. hudson.model.Build$BuildExecution.doRun(Build.java:154)
      2. hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:536)
      3. hudson.model.Run.execute(Run.java:1738)
      4. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      5. hudson.model.ResourceController.execute(ResourceController.java:98)
      6. hudson.model.Executor.run(Executor.java:381)
      6 frames