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

NotSerializableException using Phing plugin with slaves

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • phing-plugin
    • None

      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.

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

              Created:
              Updated:
              Resolved: