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

NPE after upgrade to 2.2.1 when run publisher

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: xunit-plugin
    • Labels:
      None
    • Environment:
      Jenkins: 2.121.2
      xUnit: 2.2.1
    • Similar Issues:

      Description

      JUnit files created with phpunit started to cause a NULL-pointer exception after an upgrade from xUnit 2.1.0 to 2.2.1:

      java.lang.NullPointerException
      	at org.jenkinsci.plugins.xunit.XUnitProcessor.recordTestResult(XUnitProcessor.java:354)
      	at org.jenkinsci.plugins.xunit.XUnitProcessor.process(XUnitProcessor.java:157)
      	at org.jenkinsci.plugins.xunit.XUnitPublisher.perform(XUnitPublisher.java:161)
      	at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:81)
      	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
      	at hudson.model.Build$BuildExecution.post2(Build.java:186)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
      	at hudson.model.Run.execute(Run.java:1823)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      	at hudson.model.ResourceController.execute(ResourceController.java:97)
      	at hudson.model.Executor.run(Executor.java:429)
      

      A temporary workaround is to downgrade to xUnit 2.1.0.

        Attachments

          Activity

          Hide
          nfalco Nikolas Falco added a comment -

          It's very strange that NPE because all cases seems covered. Could you please send me the job configuration? The issue is not related to the report file.

          Show
          nfalco Nikolas Falco added a comment - It's very strange that NPE because all cases seems covered. Could you please send me the job configuration? The issue is not related to the report file.
          Hide
          nfalco Nikolas Falco added a comment -

          I got it seems happens on non pipeline job with old configuration

          Show
          nfalco Nikolas Falco added a comment - I got it seems happens on non pipeline job with old configuration
          Hide
          pjaytycy Pieter-Jan Busschaert added a comment - - edited

          Exactly the same issue on our setup. Also started happening immediately after the upgrade to 2.2.1
          Most of our builds have 2 xUnit steps at the end, to collect unittest information in 2 different formats.

          INFO: Starting to record.
           INFO: Processing QTestlib-Version 5.x
           INFO: [QTestlib-Version 5.x] - 1 test report file(s) were found with the pattern 'Apps/*_qtest.xml' relative to '...' for the testing framework 'QTestlib-Version 5.x'.
           INFO: Processing GoogleTest-1.6
           INFO: [GoogleTest-1.6] - 18 test report file(s) were found with the pattern 'Apps/*_gtest.xml' relative to '...' for the testing framework 'GoogleTest-1.6'.
           ERROR: Build step failed with exception
           java.lang.NullPointerException
           at org.jenkinsci.plugins.xunit.XUnitProcessor.recordTestResult(XUnitProcessor.java:354)
           at org.jenkinsci.plugins.xunit.XUnitProcessor.process(XUnitProcessor.java:157)
           at org.jenkinsci.plugins.xunit.XUnitPublisher.perform(XUnitPublisher.java:161)
           at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:81)
           at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
           at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
           at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
           at hudson.model.Build$BuildExecution.post2(Build.java:186)
           at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
           at hudson.model.Run.execute(Run.java:1840)
           at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
           at hudson.model.ResourceController.execute(ResourceController.java:97)
           at hudson.model.Executor.run(Executor.java:429)
           Build step 'Publish xUnit test result report' marked build as failure
          Show
          pjaytycy Pieter-Jan Busschaert added a comment - - edited Exactly the same issue on our setup. Also started happening immediately after the upgrade to 2.2.1 Most of our builds have 2 xUnit steps at the end, to collect unittest information in 2 different formats. INFO: Starting to record. INFO: Processing QTestlib-Version 5.x INFO: [QTestlib-Version 5.x] - 1 test report file(s) were found with the pattern 'Apps/*_qtest.xml' relative to '...' for the testing framework 'QTestlib-Version 5.x'. INFO: Processing GoogleTest-1.6 INFO: [GoogleTest-1.6] - 18 test report file(s) were found with the pattern 'Apps/*_gtest.xml' relative to '...' for the testing framework 'GoogleTest-1.6'. ERROR: Build step failed with exception java.lang.NullPointerException at org.jenkinsci.plugins.xunit.XUnitProcessor.recordTestResult(XUnitProcessor.java:354) at org.jenkinsci.plugins.xunit.XUnitProcessor.process(XUnitProcessor.java:157) at org.jenkinsci.plugins.xunit.XUnitPublisher.perform(XUnitPublisher.java:161) at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:81) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690) at hudson.model.Build$BuildExecution.post2(Build.java:186) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635) at hudson.model.Run.execute(Run.java:1840) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:429) Build step 'Publish xUnit test result report' marked build as failure
          Hide
          notizblock Florian P added a comment -

          I attached both configs. The working one with 2.1.0 and the non-working version with 2.2.1.

          This is indeed a non-pipeline job. The job configuration is built and deployed with Jenkins Job Builder 2.2.1 (latest as of writing).

          Show
          notizblock Florian P added a comment - I attached both configs. The working one with 2.1.0 and the non-working version with 2.2.1. This is indeed a non-pipeline job. The job configuration is built and deployed with Jenkins Job Builder 2.2.1 (latest as of writing).
          Hide
          nfalco Nikolas Falco added a comment -

          Fixed in 2.2.2

          Show
          nfalco Nikolas Falco added a comment - Fixed in 2.2.2

            People

            • Assignee:
              nfalco Nikolas Falco
              Reporter:
              notizblock Florian P
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: