java.lang.ClassCastException: hudson.plugins.descriptionsetter.DescriptionSetterPublisher cannot be cast to hudson.tasks.Builder

Jenkins JIRA | Jesse Glick | 2 years ago
  1. 0

    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: {code} 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) {code} 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: {quote} <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 {quote}

    Jenkins JIRA | 4 years ago | Darryl Pogue
    java.lang.ClassCastException: org.jruby.RubyObject cannot be cast to hudson.model.Action
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

  3. 0

    [JENKINS-24864] java.lang.ClassNotFoundException: hudson.matrix.MatrixBuild - Jenkins JIRA

    jenkins-ci.org | 5 months ago
    java.lang.ClassCastException: java.util.Vector cannot be cast to hudson.util.DescribableList
  4. 0

    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: {code} 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) {code} 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: {quote} <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 {quote}

    Jenkins JIRA | 4 years ago | Darryl Pogue
    java.lang.ClassCastException: org.jruby.RubyObject cannot be cast to hudson.model.Action

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.ClassCastException

      hudson.plugins.descriptionsetter.DescriptionSetterPublisher cannot be cast to hudson.tasks.Builder

      at hudson.model.Project.createTransientActions()
    2. Hudson
      Items.load
      1. hudson.model.Project.createTransientActions(Project.java:237)
      2. hudson.model.AbstractProject.updateTransientActions(AbstractProject.java:743)
      3. hudson.model.AbstractProject.onLoad(AbstractProject.java:332)
      4. hudson.model.Project.onLoad(Project.java:95)
      5. hudson.model.Items.load(Items.java:279)
      5 frames
    3. jenkins.model
      Jenkins$17.run
      1. jenkins.model.Jenkins$17.run(Jenkins.java:2656)
      1 frame