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

xUnit fails with: org.jenkinsci.plugins.xunit.exception.XUnitException: Can't create /srv/jenkins/workspace... after upgrading to v1.74 from 1.48

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Component/s: xunit-plugin
    • Labels:
      None
    • Environment:
      Jenkins 1.545 / Linux
    • Similar Issues:

      Description

      We have a few jobs were multiple unit tests reports are created for each job run, and it looks like XUnit is trying to create 'generatedJUnitFiles/$Tool' for each test report, but w/o previouslly checking if directory already exists... and thus it fails on the second pass with the following exception:

      [xUnit] [ERROR] - Can't create /srv/jenkins/workspace/SomeProj-v1.x/generatedJUnitFiles/Gallio
      ERROR: Publisher org.jenkinsci.plugins.xunit.XUnitPublisher aborted due to exception
      java.io.IOException: remote file operation failed: /srv/jenkins/workspace/SomeProj-v1.x at hudson.remoting.Channel@403729c5:Barney-CentOS-5.x
      at hudson.FilePath.act(FilePath.java:910)
      at hudson.FilePath.act(FilePath.java:887)
      at org.jenkinsci.plugins.xunit.XUnitProcessor.performTests(XUnitProcessor.java:112)
      at org.jenkinsci.plugins.xunit.XUnitProcessor.performXUnit(XUnitProcessor.java:55)
      at org.jenkinsci.plugins.xunit.XUnitPublisher.perform(XUnitPublisher.java:75)
      at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:785)
      at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:757)
      at hudson.model.Build$BuildExecution.post2(Build.java:183)
      at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:706)
      at hudson.model.Run.execute(Run.java:1703)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:231)
      Caused by: hudson.util.IOException2: There are some problems during the conversion into JUnit reports:
      at org.jenkinsci.plugins.xunit.service.XUnitTransformer.invoke(XUnitTransformer.java:153)
      at org.jenkinsci.plugins.xunit.service.XUnitTransformer.invoke(XUnitTransformer.java:16)
      at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2461)
      at hudson.remoting.UserRequest.perform(UserRequest.java:118)
      at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      at hudson.remoting.Request$2.run(Request.java:328)
      at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      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:1146)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:679)
      Caused by: org.jenkinsci.plugins.xunit.exception.XUnitException: Can't create /srv/jenkins/workspace/SomeProj-v1.x/generatedJUnitFiles/Gallio
      at org.jenkinsci.plugins.xunit.service.XUnitConversionService.convert(XUnitConversionService.java:47)
      at org.jenkinsci.plugins.xunit.service.XUnitTransformer.invoke(XUnitTransformer.java:121)
      ... 11 more

        Attachments

          Activity

          Hide
          pabloruiz Pablo Ruiz added a comment -

          I've just sent a pull-req on github with an small fix for this issue.

          Show
          pabloruiz Pablo Ruiz added a comment - I've just sent a pull-req on github with an small fix for this issue.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Pablo Ruiz García
          Path:
          src/main/java/org/jenkinsci/plugins/xunit/service/XUnitConversionService.java
          http://jenkins-ci.org/commit/xunit-plugin/0a67f16b77b4f039c992d67257ac6833a7e25399
          Log:
          Fix for JENKINS-21195

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Pablo Ruiz García Path: src/main/java/org/jenkinsci/plugins/xunit/service/XUnitConversionService.java http://jenkins-ci.org/commit/xunit-plugin/0a67f16b77b4f039c992d67257ac6833a7e25399 Log: Fix for JENKINS-21195
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Gregory Boissinot
          Path:
          src/main/java/org/jenkinsci/plugins/xunit/service/XUnitConversionService.java
          http://jenkins-ci.org/commit/xunit-plugin/c64b39e19a769000640cc4fb89c0a4284e25eab3
          Log:
          Merge pull request #14 from pruiz/JENKINS-21195

          Simple fix for JENKINS-21195

          Compare: https://github.com/jenkinsci/xunit-plugin/compare/82d4da233018...c64b39e19a76

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Gregory Boissinot Path: src/main/java/org/jenkinsci/plugins/xunit/service/XUnitConversionService.java http://jenkins-ci.org/commit/xunit-plugin/c64b39e19a769000640cc4fb89c0a4284e25eab3 Log: Merge pull request #14 from pruiz/ JENKINS-21195 Simple fix for JENKINS-21195 Compare: https://github.com/jenkinsci/xunit-plugin/compare/82d4da233018...c64b39e19a76

            People

            • Assignee:
              gbois Gregory Boissinot
              Reporter:
              pabloruiz Pablo Ruiz
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: