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

Ruby Plugin causes jobs to fail to load

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major Major
    • ruby-runtime-plugin
    • None

      Adding an action to a build using a Ruby plugin causes the build to fail to load when Jenkins is restarted.

      The error looks like this:

      SEVERE: Failed Loading job cool
      java.lang.ClassCastException: org.jruby.RubyObject cannot be cast to hudson.model.Action
      	at hudson.model.Run.onLoad(Run.java:293)
      	at hudson.model.RunMap.load(RunMap.java:234)
      	at hudson.model.AbstractProject.onLoad(AbstractProject.java:254)
      	at hudson.model.Project.onLoad(Project.java:88)
      	at hudson.model.Items.load(Items.java:115)
      	at jenkins.model.Jenkins$14.run(Jenkins.java:2360)
      	at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:146)
      	at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:259)
      	at jenkins.model.Jenkins$5.runTask(Jenkins.java:800)
      	at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:187)
      	at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:94)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      	at java.lang.Thread.run(Thread.java:680)
      

      The bug was originally mentioned in IRC on April 11th by dragonkh_: http://echelog.com/logs/browse/jenkins/1334095200

      Relevant parts of the IRC conversattion:

      <cowboyd> dragonkh_: do you get an exception on startup?
      <dragonkh_> cowboyd - it happens when I start up jenkins
      <dragonkh_> cowboyd - http://pastie.org/3768530
      <dragonkh_> cowboyd - thats the exception I get on starting up jenkins - the job fails to load
      <dragonkh_> is it in the ruby-runtime somewhere?
      <cowboyd> can you send me the xml for the job?
      <cowboyd> It's the persistence that is getting confused.
      <dragonkh_> cowboyd - isnt this the config? http://pastie.org/3768541
      <dragonkh_> cowboyd - check my code here: https://github.com/masterthought/jenkins-cucumber-jvm-reports-plugin
      <cowboyd> dragonkh: can I see the xml for the build?
      <dragonkh_> cowboyd - http://pastie.org/3768765
      <cowboyd> yes, that's it. kohsuke: ^^ any idea why jruby-xstream would be handing the ruby object and not the jruby proxy?

      <dragonkh> cowboyd - got any idea where I can have a look ?
      <cowboyd> yes, it's in the deserialization code. https://github.com/jenkinsci/jruby-xstream
      <dragonkh> is that part of the main jenkins release?
      <cowboyd> all ruby plugins depend on it
      <dragonkh> or is it part of the ruby-runtime ?
      <cowboyd> jenkins.rb/java-runtime depends on it

            cowboyd Charles Lowell
            dpogue Darryl Pogue
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: