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

NotSerializableException using Phing plugin with slaves

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Some folks here at Yahoo! have used the Phing plugin in the past and ran into trouble trying to use it in a master/slave configuration. Here is the exception they were getting (this stack trace is from over a year ago):

      java.io.IOException: Unable to serialize hudson.plugins.phing.PhingInstallation$1@1cb3087
      at hudson.remoting.UserRequest.serialize(UserRequest.java:126)
      at hudson.remoting.UserRequest.<init>(UserRequest.java:60)
      at hudson.remoting.Channel.call(Channel.java:475)
      at hudson.plugins.phing.PhingInstallation.getExecutable(PhingInstallation.java:72)
      at hudson.plugins.phing.PhingBuilder.perform(PhingBuilder.java:120)
      at hudson.model.Build$RunnerImpl.build(Build.java:193)
      at hudson.model.Build$RunnerImpl.doRun(Build.java:144)
      at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:272)
      at hudson.model.Run.run(Run.java:865)
      at hudson.model.Build.run(Build.java:112)
      at hudson.model.ResourceController.execute(ResourceController.java:93)
      at hudson.model.Executor.run(Executor.java:113)
      Caused by: java.io.NotSerializableException: hudson.Launcher$RemoteLauncher
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)
      at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
      at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
      at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
      at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
      at hudson.remoting.UserRequest.serialize(UserRequest.java:123)
      ... 11 more

      I've attached a patch that fixes this by determining the executable name on the master before starting the remote call and removing the launcher from the callable state.

        Attachments

          Activity

          Hide
          sogabe sogabe added a comment -

          Thanks for patch.
          Phing Plugin 0.5 has released.

          Show
          sogabe sogabe added a comment - Thanks for patch. Phing Plugin 0.5 has released.

            People

            • Assignee:
              sogabe sogabe
              Reporter:
              md5 Mike Dillon
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: