Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-11858

xUnit v1.30 fails with NullPointerException when parsing cppnit results

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Component/s: xunit-plugin
    • Labels:
      None
    • Environment:
    • Similar Issues:
      Show 5 results

      Description

      Latest xUnit v1.30 fails with NullPointerException when parsing cppunit xml results - regressing back to v1.29 resolves the issue.

      [xUnit] [INFO] - Starting to record.
      [xUnit] [INFO] - Processing CppUnit-1.12.1 (default)
      [xUnit] [INFO] - [CppUnit-1.12.1 (default)] - 13 test report file(s) were found with the pattern 'build/**/cppunit.xml' relative to '/sandbox/trunk' for the testing framework 'CppUnit-1.12.1 (default)'.
      ERROR: Publisher com.thalesgroup.hudson.plugins.xunit.XUnitPublisher aborted due to exception
      java.lang.NullPointerException
      	at com.thalesgroup.hudson.plugins.xunit.XUnitPublisher.processResultThreshold(XUnitPublisher.java:354)
      	at com.thalesgroup.hudson.plugins.xunit.XUnitPublisher.getResultWithThreshold(XUnitPublisher.java:345)
      	at com.thalesgroup.hudson.plugins.xunit.XUnitPublisher.setBuildStatus(XUnitPublisher.java:330)
      	at com.thalesgroup.hudson.plugins.xunit.XUnitPublisher.performXUnit(XUnitPublisher.java:133)
      	at com.thalesgroup.hudson.plugins.xunit.XUnitPublisher.perform(XUnitPublisher.java:101)
      	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
      	at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:692)
      	at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:667)
      	at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:645)
      	at hudson.model.Build$RunnerImpl.post2(Build.java:162)
      	at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:614)
      	at hudson.model.Run.run(Run.java:1429)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      	at hudson.model.ResourceController.execute(ResourceController.java:88)
      	at hudson.model.Executor.run(Executor.java:230)
      

      Here is the xunit config from config.xml:

          <com.thalesgroup.hudson.plugins.xunit.XUnitPublisher>
            <types>
              <com.thalesgroup.dtkit.metrics.hudson.model.CppUnitJunitHudsonTestType>
                <pattern>build/**/cppunit.xml</pattern>
                <faildedIfNotNew>false</faildedIfNotNew>
                <deleteOutputFiles>true</deleteOutputFiles>
                <stopProcessingIfError>true</stopProcessingIfError>
              </com.thalesgroup.dtkit.metrics.hudson.model.CppUnitJunitHudsonTestType>
            </types>
          </com.thalesgroup.hudson.plugins.xunit.XUnitPublisher>
      

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Gregory Boissinot
          Path:
          src/main/java/com/thalesgroup/hudson/plugins/xunit/XUnitPublisher.java
          http://jenkins-ci.org/commit/xunit-plugin/e74169fafb81ce4364abc7b729ec6298d2e9631d
          Log:
          Fix JENKINS-11858

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Gregory Boissinot Path: src/main/java/com/thalesgroup/hudson/plugins/xunit/XUnitPublisher.java http://jenkins-ci.org/commit/xunit-plugin/e74169fafb81ce4364abc7b729ec6298d2e9631d Log: Fix JENKINS-11858
          Hide
          gbois Gregory Boissinot added a comment -

          Fix in 1.31

          Show
          gbois Gregory Boissinot added a comment - Fix in 1.31
          Hide
          weakcamel Waldek M added a comment -

          I can see almost the same issue re-appear on 1.31 version.
          Should I reopen?
          Thanks,
          =====================
          Here's the stacktrace

          [xUnit] [INFO] - Processing CppUnit-1.x
          [xUnit] [INFO] - Check 'Failed Tests' threshold.
          ERROR: Publisher com.thalesgroup.hudson.plugins.xunit.XUnitPublisher aborted due to exception
          java.lang.NumberFormatException: For input string: ""
          at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
          at java.lang.Integer.parseInt(Integer.java:470)
          at java.lang.Integer.parseInt(Integer.java:499)
          at org.jenkinsci.plugins.xunit.threshold.XUnitThreshold.convertToInteger(XUnitThreshold.java:60)
          at org.jenkinsci.plugins.xunit.threshold.XUnitThreshold.getResultThreshold(XUnitThreshold.java:76)
          at org.jenkinsci.plugins.xunit.threshold.FailedThreshold.getResultThreshold(FailedThreshold.java:33)
          at com.thalesgroup.hudson.plugins.xunit.XUnitPublisher.processResultThreshold(XUnitPublisher.java:357)
          at com.thalesgroup.hudson.plugins.xunit.XUnitPublisher.getResultWithThreshold(XUnitPublisher.java:345)
          at com.thalesgroup.hudson.plugins.xunit.XUnitPublisher.setBuildStatus(XUnitPublisher.java:330)
          at com.thalesgroup.hudson.plugins.xunit.XUnitPublisher.performXUnit(XUnitPublisher.java:133)
          at com.thalesgroup.hudson.plugins.xunit.XUnitPublisher.perform(XUnitPublisher.java:101)
          at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
          at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:692)
          at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:667)
          at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:645)
          at hudson.model.Build$RunnerImpl.post2(Build.java:162)
          at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:614)
          at hudson.model.Run.run(Run.java:1429)
          at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
          at hudson.model.ResourceController.execute(ResourceController.java:88)
          at hudson.model.Executor.run(Executor.java:238)
          Email was triggered for: Failure

          Show
          weakcamel Waldek M added a comment - I can see almost the same issue re-appear on 1.31 version. Should I reopen? Thanks, ===================== Here's the stacktrace [xUnit] [INFO] - Processing CppUnit-1.x [xUnit] [INFO] - Check 'Failed Tests' threshold. ERROR: Publisher com.thalesgroup.hudson.plugins.xunit.XUnitPublisher aborted due to exception java.lang.NumberFormatException: For input string: "" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) at java.lang.Integer.parseInt(Integer.java:470) at java.lang.Integer.parseInt(Integer.java:499) at org.jenkinsci.plugins.xunit.threshold.XUnitThreshold.convertToInteger(XUnitThreshold.java:60) at org.jenkinsci.plugins.xunit.threshold.XUnitThreshold.getResultThreshold(XUnitThreshold.java:76) at org.jenkinsci.plugins.xunit.threshold.FailedThreshold.getResultThreshold(FailedThreshold.java:33) at com.thalesgroup.hudson.plugins.xunit.XUnitPublisher.processResultThreshold(XUnitPublisher.java:357) at com.thalesgroup.hudson.plugins.xunit.XUnitPublisher.getResultWithThreshold(XUnitPublisher.java:345) at com.thalesgroup.hudson.plugins.xunit.XUnitPublisher.setBuildStatus(XUnitPublisher.java:330) at com.thalesgroup.hudson.plugins.xunit.XUnitPublisher.performXUnit(XUnitPublisher.java:133) at com.thalesgroup.hudson.plugins.xunit.XUnitPublisher.perform(XUnitPublisher.java:101) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:692) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:667) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:645) at hudson.model.Build$RunnerImpl.post2(Build.java:162) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:614) at hudson.model.Run.run(Run.java:1429) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:238) Email was triggered for: Failure
          Hide
          weakcamel Waldek M added a comment -

          Issue reappearing with xUnit v1.31 on jdk1.6.0_24, Jenkins 1.441. Downgrading plugin to 1.31 helped. Stacktrace similar yet with a small difference - already put into comment above.

          Show
          weakcamel Waldek M added a comment - Issue reappearing with xUnit v1.31 on jdk1.6.0_24, Jenkins 1.441. Downgrading plugin to 1.31 helped. Stacktrace similar yet with a small difference - already put into comment above.
          Hide
          gbois Gregory Boissinot added a comment - - edited

          Please could you check again your job configuration file and attach the file (config.xml)?
          Thanks in advance.

          Show
          gbois Gregory Boissinot added a comment - - edited Please could you check again your job configuration file and attach the file (config.xml)? Thanks in advance.
          Hide
          gbois Gregory Boissinot added a comment -

          Fix in 1.34

          Show
          gbois Gregory Boissinot added a comment - Fix in 1.34
          Hide
          weakcamel Waldek M added a comment -

          Hello,
          I'm terribly sorry for lack of response - the notification from JIRA must have ended in my spambox :-/ I'll give it a go as soon as I can and give feedback.

          Show
          weakcamel Waldek M added a comment - Hello, I'm terribly sorry for lack of response - the notification from JIRA must have ended in my spambox :-/ I'll give it a go as soon as I can and give feedback.
          Hide
          weakcamel Waldek M added a comment -

          No problems with 1.34 noticed so far. Thanks!

          Show
          weakcamel Waldek M added a comment - No problems with 1.34 noticed so far. Thanks!

            People

            • Assignee:
              gbois Gregory Boissinot
              Reporter:
              jalexand jalexand
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: