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.

  • 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
    via by Kevin Cai,
  • 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)
    via by dhauslad,
  • ---- 11 oct. 2010 12:52:19 com.sonyericsson.hudson.plugins.gerrit.trigger.gerritnotifier.ToGerritRunListener onCompleted INFO: Completed. Build: Kernel #9 Cause: GerritCause: PatchsetCreated: Change: 153 PatchSet: 1 silent: false 11 oct. 2010 12:52:19 com.sonyericsson.hudson.plugins.gerrit.trigger.gerritnotifier.ToGerritRunListener onCompleted INFO: All Builds are completed for cause: GerritCause: PatchsetCreated: Change: 153 PatchSet: 1 silent: false ---- 11 oct. 2010 12:52:19 com.sonyericsson.hudson.plugins.gerrit.trigger.gerritnotifier.ParameterExpander expandParameters GRAVE: Failed to expand env vars into gerrit cmd. Gerrit won't be notified!! ---- java.lang.NullPointerException at hudson.model.Run.getEnvironment(Run.java:1673) 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.getBuildCompletedCommand(ParameterExpander.java:355) at com.sonyericsson.hudson.plugins.gerrit.trigger.gerritnotifier.GerritNotifier.buildCompleted(GerritNotifier.java:100) at com.sonyericsson.hudson.plugins.gerrit.trigger.gerritnotifier.job.BuildCompletedCommandJob.run(BuildCompletedCommandJob.java:63) 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) 11 oct. 2010 12:52:19 com.sonyericsson.hudson.plugins.gerrit.trigger.gerritnotifier.GerritNotifier buildCompleted GRAVE: Something wrong during parameter extraction. Gerrit will not be notified of BuildCompleted
    via by Gregory,
  • 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.
    via by Yoann Dubreuil,
  • When a specific Java version is selected in a Maven Project and that Java version is configured to automatically install, there is a NullPointerException thrown related to using {{build.getEnvironment(listener)}} in email ext templates. This causes data loss in the reports related to environment variables. The exception from the jenkins log is: {code} Dec 15, 2015 1:34:59 PM org.apache.commons.jelly.expression.jexl.JexlExpression evaluate WARNING: Caught exception evaluating: build.getEnvironment(listener). Reason: java.lang.NullPointerException java.lang.NullPointerException at hudson.tools.JDKInstaller.performInstallation(JDKInstaller.java:119) 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 hudson.maven.AbstractMavenBuild.getEnvironment(AbstractMavenBuild.java:56) at hudson.maven.MavenModuleSetBuild.getEnvironment(MavenModuleSetBuild.java:166) at sun.reflect.GeneratedMethodAccessor1371.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.commons.jexl.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:258) at org.apache.commons.jexl.parser.ASTMethod.execute(ASTMethod.java:104) at org.apache.commons.jexl.parser.ASTReference.execute(ASTReference.java:83) at org.apache.commons.jexl.parser.ASTReference.value(ASTReference.java:57) at org.apache.commons.jexl.parser.ASTReferenceExpression.value(ASTReferenceExpression.java:51) at org.apache.commons.jexl.ExpressionImpl.evaluate(ExpressionImpl.java:80) at org.apache.commons.jelly.expression.jexl.JexlExpression.evaluate(JexlExpression.java:69) at org.apache.commons.jelly.tags.core.CoreTagLibrary$3.run(CoreTagLibrary.java:134) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161) at org.apache.commons.jelly.impl.StaticTag.doTag(StaticTag.java:65) at org.apache.commons.jelly.impl.StaticTagScript.run(StaticTagScript.java:124) at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105) at hudson.plugins.emailext.plugins.content.JellyScriptContent.convert(JellyScriptContent.java:82) at hudson.plugins.emailext.plugins.content.JellyScriptContent.renderContent(JellyScriptContent.java:73) at hudson.plugins.emailext.plugins.content.JellyScriptContent.evaluate(JellyScriptContent.java:48) at org.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro.evaluate(DataBoundTokenMacro.java:190) at org.jenkinsci.plugins.tokenmacro.TokenMacro.expand(TokenMacro.java:191) at org.jenkinsci.plugins.tokenmacro.TokenMacro.expandAll(TokenMacro.java:246) at hudson.plugins.emailext.plugins.ContentBuilder.transformText(ContentBuilder.java:71) at hudson.plugins.emailext.ExtendedEmailPublisher.addContent(ExtendedEmailPublisher.java:671) at hudson.plugins.emailext.ExtendedEmailPublisher.createMail(ExtendedEmailPublisher.java:550) at hudson.plugins.emailext.ExtendedEmailPublisher.sendMail(ExtendedEmailPublisher.java:331) at hudson.plugins.emailext.ExtendedEmailPublisher._perform(ExtendedEmailPublisher.java:322) at hudson.plugins.emailext.ExtendedEmailPublisher.perform(ExtendedEmailPublisher.java:230) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:776) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.cleanUp(MavenModuleSetBuild.java:1071) at hudson.model.Run.execute(Run.java:1785) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:381) {code} The code in the jelly template is: {code} <j:set var="envVars" value="${build.getEnvironment(listener)}" /> {code}
    via by Jeff Ekhardt,
  • ---- 11 oct. 2010 12:52:19 com.sonyericsson.hudson.plugins.gerrit.trigger.gerritnotifier.ToGerritRunListener onCompleted INFO: Completed. Build: Kernel #9 Cause: GerritCause: PatchsetCreated: Change: 153 PatchSet: 1 silent: false 11 oct. 2010 12:52:19 com.sonyericsson.hudson.plugins.gerrit.trigger.gerritnotifier.ToGerritRunListener onCompleted INFO: All Builds are completed for cause: GerritCause: PatchsetCreated: Change: 153 PatchSet: 1 silent: false ---- 11 oct. 2010 12:52:19 com.sonyericsson.hudson.plugins.gerrit.trigger.gerritnotifier.ParameterExpander expandParameters GRAVE: Failed to expand env vars into gerrit cmd. Gerrit won't be notified!! ---- java.lang.NullPointerException at hudson.model.Run.getEnvironment(Run.java:1673) 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.getBuildCompletedCommand(ParameterExpander.java:355) at com.sonyericsson.hudson.plugins.gerrit.trigger.gerritnotifier.GerritNotifier.buildCompleted(GerritNotifier.java:100) at com.sonyericsson.hudson.plugins.gerrit.trigger.gerritnotifier.job.BuildCompletedCommandJob.run(BuildCompletedCommandJob.java:63) 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) 11 oct. 2010 12:52:19 com.sonyericsson.hudson.plugins.gerrit.trigger.gerritnotifier.GerritNotifier buildCompleted GRAVE: Something wrong during parameter extraction. Gerrit will not be notified of BuildCompleted
    via by Gregory,
  • When a specific Java version is selected in a Maven Project and that Java version is configured to automatically install, there is a NullPointerException thrown related to using {{build.getEnvironment(listener)}} in email ext templates. This causes data loss in the reports related to environment variables. The exception from the jenkins log is: {code} Dec 15, 2015 1:34:59 PM org.apache.commons.jelly.expression.jexl.JexlExpression evaluate WARNING: Caught exception evaluating: build.getEnvironment(listener). Reason: java.lang.NullPointerException java.lang.NullPointerException at hudson.tools.JDKInstaller.performInstallation(JDKInstaller.java:119) 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 hudson.maven.AbstractMavenBuild.getEnvironment(AbstractMavenBuild.java:56) at hudson.maven.MavenModuleSetBuild.getEnvironment(MavenModuleSetBuild.java:166) at sun.reflect.GeneratedMethodAccessor1371.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.commons.jexl.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:258) at org.apache.commons.jexl.parser.ASTMethod.execute(ASTMethod.java:104) at org.apache.commons.jexl.parser.ASTReference.execute(ASTReference.java:83) at org.apache.commons.jexl.parser.ASTReference.value(ASTReference.java:57) at org.apache.commons.jexl.parser.ASTReferenceExpression.value(ASTReferenceExpression.java:51) at org.apache.commons.jexl.ExpressionImpl.evaluate(ExpressionImpl.java:80) at org.apache.commons.jelly.expression.jexl.JexlExpression.evaluate(JexlExpression.java:69) at org.apache.commons.jelly.tags.core.CoreTagLibrary$3.run(CoreTagLibrary.java:134) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161) at org.apache.commons.jelly.impl.StaticTag.doTag(StaticTag.java:65) at org.apache.commons.jelly.impl.StaticTagScript.run(StaticTagScript.java:124) at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105) at hudson.plugins.emailext.plugins.content.JellyScriptContent.convert(JellyScriptContent.java:82) at hudson.plugins.emailext.plugins.content.JellyScriptContent.renderContent(JellyScriptContent.java:73) at hudson.plugins.emailext.plugins.content.JellyScriptContent.evaluate(JellyScriptContent.java:48) at org.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro.evaluate(DataBoundTokenMacro.java:190) at org.jenkinsci.plugins.tokenmacro.TokenMacro.expand(TokenMacro.java:191) at org.jenkinsci.plugins.tokenmacro.TokenMacro.expandAll(TokenMacro.java:246) at hudson.plugins.emailext.plugins.ContentBuilder.transformText(ContentBuilder.java:71) at hudson.plugins.emailext.ExtendedEmailPublisher.addContent(ExtendedEmailPublisher.java:671) at hudson.plugins.emailext.ExtendedEmailPublisher.createMail(ExtendedEmailPublisher.java:550) at hudson.plugins.emailext.ExtendedEmailPublisher.sendMail(ExtendedEmailPublisher.java:331) at hudson.plugins.emailext.ExtendedEmailPublisher._perform(ExtendedEmailPublisher.java:322) at hudson.plugins.emailext.ExtendedEmailPublisher.perform(ExtendedEmailPublisher.java:230) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:776) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.cleanUp(MavenModuleSetBuild.java:1071) at hudson.model.Run.execute(Run.java:1785) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:381) {code} The code in the jelly template is: {code} <j:set var="envVars" value="${build.getEnvironment(listener)}" /> {code}
    via by Jeff Ekhardt,
    • java.lang.NullPointerException at hudson.model.Run.getEnvironment(Run.java:1648) at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:663) at hudson.plugins.mercurial.MercurialSCM.compareRemoteRevisionWith(MercurialSCM.java:250) at hudson.scm.SCM._compareRemoteRevisionWith(SCM.java:351) at hudson.scm.SCM.poll(SCM.java:368) at hudson.model.AbstractProject.poll(AbstractProject.java:1153) at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:330) at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:359) 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:619)
    No Bugmate found.