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

xUnit remote file operation files - NotSerializableException

    XMLWordPrintable

    Details

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

      Description

      When processing junit files on remote SSH slaves the xUnit plugin fails with:

      18:58:45 [xUnit] [ERROR] - The plugin hasn't been performed correctly: remote file operation failed: /home/jenkins/workspace/build_job at hudson.remoting.Channel@538d6dc9:vagrant-slave62

      I added some more debug information to the code and found the case:

      org.jenkinsci.plugins.xunit.exception.XUnitException: remote file operation failed: /home/jenkins/workspace/xunit at hudson.remoting.Channel@2f71a393:vagrant
      at org.jenkinsci.plugins.xunit.XUnitProcessor.getTestResult(XUnitProcessor.java:331)
      at org.jenkinsci.plugins.xunit.XUnitProcessor.recordTestResult(XUnitProcessor.java:258)
      at org.jenkinsci.plugins.xunit.XUnitProcessor.performXUnit(XUnitProcessor.java:74)
      at org.jenkinsci.plugins.xunit.XUnitPublisher.perform(XUnitPublisher.java:88)
      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: java.io.IOException: remote file operation failed: /home/jenkins/workspace/xunit at hudson.remoting.Channel@2f71a393:vagrant
      at hudson.FilePath.act(FilePath.java:910)
      at hudson.FilePath.act(FilePath.java:887)
      at org.jenkinsci.plugins.xunit.XUnitProcessor.getTestResult(XUnitProcessor.java:302)
      ... 12 more
      Caused by: java.io.IOException: Unable to serialize hudson.FilePath$FileCallableWrapper@1ccce215
      at hudson.remoting.UserRequest.serialize(UserRequest.java:166)
      at hudson.remoting.UserRequest.<init>(UserRequest.java:62)
      at hudson.remoting.Channel.call(Channel.java:721)
      at hudson.FilePath.act(FilePath.java:903)
      ... 14 more
      Caused by: java.io.NotSerializableException: org.jenkinsci.plugins.xunit.ExtraConfiguration
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1183)
      at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1547)
      at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1508)
      at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1431)
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1177)
      at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1547)
      at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1508)
      at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1431)
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1177)
      at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1547)
      at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1508)
      at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1431)
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1177)
      at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:347)
      at hudson.remoting.UserRequest._serialize(UserRequest.java:155)
      at hudson.remoting.UserRequest.serialize(UserRequest.java:164)
      ... 17 more

      After making both XUnitProcessor and ExtraConfiguration implement java.io.Serializable problem goes away.

        Attachments

          Activity

          Hide
          mindjiver Peter Jönsson added a comment -

          Quick fix pull request is here: https://github.com/jenkinsci/xunit-plugin/pull/16

          Show
          mindjiver Peter Jönsson added a comment - Quick fix pull request is here: https://github.com/jenkinsci/xunit-plugin/pull/16
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Peter Jönsson
          Path:
          src/main/java/org/jenkinsci/plugins/xunit/ExtraConfiguration.java
          src/main/java/org/jenkinsci/plugins/xunit/XUnitProcessor.java
          http://jenkins-ci.org/commit/xunit-plugin/719b511a87bf0ffa31be28c0f9e4d05b9e185e0c
          Log:
          JENKINS-21220 - Make XUnitProcessor serializable

          When processing xUnit files on remote SSH slaves the following error
          was obserserved:

          The plugin hasn't been performed correctly: remote file operation failed: /home/jenkins/workspace/xunit at hudson.remoting.Channel@56f87a20:slave

          When investigating it was found that a NotSerializableException was
          thrown. Simply make the needed classes serializable.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Peter Jönsson Path: src/main/java/org/jenkinsci/plugins/xunit/ExtraConfiguration.java src/main/java/org/jenkinsci/plugins/xunit/XUnitProcessor.java http://jenkins-ci.org/commit/xunit-plugin/719b511a87bf0ffa31be28c0f9e4d05b9e185e0c Log: JENKINS-21220 - Make XUnitProcessor serializable When processing xUnit files on remote SSH slaves the following error was obserserved: The plugin hasn't been performed correctly: remote file operation failed: /home/jenkins/workspace/xunit at hudson.remoting.Channel@56f87a20:slave When investigating it was found that a NotSerializableException was thrown. Simply make the needed classes serializable.
          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/ExtraConfiguration.java
          src/main/java/org/jenkinsci/plugins/xunit/XUnitProcessor.java
          http://jenkins-ci.org/commit/xunit-plugin/a4790967f8928d368b819b35b6577d474c660066
          Log:
          Merge pull request #16 from mindjiver/make-xunit-processor-serializable

          JENKINS-21220 - Make XUnitProcessor serializable

          Compare: https://github.com/jenkinsci/xunit-plugin/compare/1c3b76704a85...a4790967f892

          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/ExtraConfiguration.java src/main/java/org/jenkinsci/plugins/xunit/XUnitProcessor.java http://jenkins-ci.org/commit/xunit-plugin/a4790967f8928d368b819b35b6577d474c660066 Log: Merge pull request #16 from mindjiver/make-xunit-processor-serializable JENKINS-21220 - Make XUnitProcessor serializable Compare: https://github.com/jenkinsci/xunit-plugin/compare/1c3b76704a85...a4790967f892

            People

            • Assignee:
              gbois Gregory Boissinot
              Reporter:
              mindjiver Peter Jönsson
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: