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.

  • After updating from 1.324 to 1.326, I get an NPE at the end of a build. I also changed the directory structure and removed some directories in the hierarchy so the location of the xml files is not the same. The trace is: [...] BUILD SUCCESSFUL Total time: 1 minute 42 seconds Terminating xvnc. [workspace] $ vncserver -kill :12 Killing Xvnc process ID 4037 Recording test results FATAL: null java.lang.NullPointerException at hudson.tasks.junit.SuiteResult.getCase(SuiteResult.java:228) at hudson.tasks.junit.CaseResult.getPreviousResult(CaseResult.java:318) at hudson.tasks.junit.CaseResult.freeze(CaseResult.java:412) at hudson.tasks.junit.SuiteResult.freeze(SuiteResult.java:248) at hudson.tasks.junit.TestResult.freeze(TestResult.java:313) at hudson.tasks.junit.TestResultAction.setResult(TestResultAction.java:78) at hudson.tasks.junit.TestResultAction.<init>(TestResultAction.java:71) at hudson.tasks.junit.JUnitResultArchiver.perform(JUnitResultArchiver.java:120) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:480) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:466) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:454) at hudson.model.Build$RunnerImpl.post2(Build.java:146) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:438) at hudson.model.Run.run(Run.java:1143) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:123)
    via by xlv_at_gwc,
  • After updating from 1.324 to 1.326, I get an NPE at the end of a build. I also changed the directory structure and removed some directories in the hierarchy so the location of the xml files is not the same. The trace is: [...] BUILD SUCCESSFUL Total time: 1 minute 42 seconds Terminating xvnc. [workspace] $ vncserver -kill :12 Killing Xvnc process ID 4037 Recording test results FATAL: null java.lang.NullPointerException at hudson.tasks.junit.SuiteResult.getCase(SuiteResult.java:228) at hudson.tasks.junit.CaseResult.getPreviousResult(CaseResult.java:318) at hudson.tasks.junit.CaseResult.freeze(CaseResult.java:412) at hudson.tasks.junit.SuiteResult.freeze(SuiteResult.java:248) at hudson.tasks.junit.TestResult.freeze(TestResult.java:313) at hudson.tasks.junit.TestResultAction.setResult(TestResultAction.java:78) at hudson.tasks.junit.TestResultAction.<init>(TestResultAction.java:71) at hudson.tasks.junit.JUnitResultArchiver.perform(JUnitResultArchiver.java:120) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:480) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:466) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:454) at hudson.model.Build$RunnerImpl.post2(Build.java:146) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:438) at hudson.model.Run.run(Run.java:1143) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:123)
    via by xlv_at_gwc,
  • Using a component that generates JUnit compatible reports files (xml). When clicking at the webgui and start a build the report will be read and displayed as a testresult. However when the build is a result of a scm trigger the xml file don't get loaded and instead this happens --Recording test results FATAL: null java.lang.NullPointerException at hudson.tasks.junit.SuiteResult.getCase(SuiteResult.java:228) at hudson.tasks.junit.CaseResult.getPreviousResult(CaseResult.java:318) at hudson.tasks.junit.CaseResult.freeze(CaseResult.java:411) at hudson.tasks.junit.SuiteResult.freeze(SuiteResult.java:248) at hudson.tasks.junit.TestResult.freeze(TestResult.java:310) at hudson.tasks.junit.TestResultAction.setResult(TestResultAction.java:78) at hudson.tasks.junit.TestResultAction.<init>(TestResultAction.java:71) at hudson.tasks.junit.JUnitResultArchiver.perform(JUnitResultArchiver.java:119) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:480) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:466) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:454) at hudson.model.Build$RunnerImpl.post2(Build.java:146) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:438) at hudson.model.Run.run(Run.java:1140) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:93) at hudson.model.Executor.run(Executor.java:122) --- sample of the result file --- <?xml version="1.0" encoding="UTF-8" ?> <testsuite errors="0" failures="1" name="blocktea" tests="3" time="0" timestamp="0"> <testcase classname="Cblocktea" name="T1" time="0" /> <testcase classname="Cblocktea" name="T2" time="0" /> <testcase classname="Cblocktea" name="T2" time="0"> <failure message="nomesg" time="0" type="junit.framework.AssertionFailedError">nomessage</failure> </testcase> </testsuite> ---
    via by jonke0,
  • Using a component that generates JUnit compatible reports files (xml). When clicking at the webgui and start a build the report will be read and displayed as a testresult. However when the build is a result of a scm trigger the xml file don't get loaded and instead this happens --Recording test results FATAL: null java.lang.NullPointerException at hudson.tasks.junit.SuiteResult.getCase(SuiteResult.java:228) at hudson.tasks.junit.CaseResult.getPreviousResult(CaseResult.java:318) at hudson.tasks.junit.CaseResult.freeze(CaseResult.java:411) at hudson.tasks.junit.SuiteResult.freeze(SuiteResult.java:248) at hudson.tasks.junit.TestResult.freeze(TestResult.java:310) at hudson.tasks.junit.TestResultAction.setResult(TestResultAction.java:78) at hudson.tasks.junit.TestResultAction.<init>(TestResultAction.java:71) at hudson.tasks.junit.JUnitResultArchiver.perform(JUnitResultArchiver.java:119) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:480) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:466) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:454) at hudson.model.Build$RunnerImpl.post2(Build.java:146) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:438) at hudson.model.Run.run(Run.java:1140) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:93) at hudson.model.Executor.run(Executor.java:122) --- sample of the result file --- <?xml version="1.0" encoding="UTF-8" ?> <testsuite errors="0" failures="1" name="blocktea" tests="3" time="0" timestamp="0"> <testcase classname="Cblocktea" name="T1" time="0" /> <testcase classname="Cblocktea" name="T2" time="0" /> <testcase classname="Cblocktea" name="T2" time="0"> <failure message="nomesg" time="0" type="junit.framework.AssertionFailedError">nomessage</failure> </testcase> </testsuite> ---
    via by jonke0,
    • java.lang.NullPointerException at hudson.tasks.junit.SuiteResult.getCase(SuiteResult.java:228) at hudson.tasks.junit.CaseResult.getPreviousResult(CaseResult.java:318) at hudson.tasks.junit.CaseResult.freeze(CaseResult.java:412) at hudson.tasks.junit.SuiteResult.freeze(SuiteResult.java:248) at hudson.tasks.junit.TestResult.freeze(TestResult.java:313) at hudson.tasks.junit.TestResultAction.setResult(TestResultAction.java:78) at hudson.tasks.junit.TestResultAction.<init>(TestResultAction.java:71) at hudson.tasks.junit.JUnitResultArchiver.perform(JUnitResultArchiver.java:120) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:480)
    No Bugmate found.