udson.util.HudsonFailedToLoad: org.jvnet.hudson.reactor.ReactorException: java.lang.ClassCastException: org.jenkinsci.plugins.conditionalbuildstep.singlestep.SingleConditionalBuilder cannot be cast to hudson.tasks.Publisher

Jenkins JIRA | Félix Belzunce Arcos | 6 months ago
  1. 0

    Basically, I believe this stacktrace is saying that when the maven-plugin is doing [getParent().getPublishers()](https://github.com/jenkinsci/maven-plugin/blob/9c5eb51dda735450a6cc7a59201efe2cd795625a/src/main/java/hudson/maven/MavenModule.java#L675) in Runtime is getting `ClassCastException` because there is something on the list that is not a `Publisher`. I believe the problem is in the [conditional-buildstep-plugin](https://github.com/jenkinsci/conditional-buildstep-plugin/blob/a906535e3d680c7c8ca5d79a3bde9c80d56e9564/src/main/java/org/jenkinsci/plugins/conditionalbuildstep/singlestep/SingleConditionalBuilder.java#L113) which is doing a cast to `DependecyDeclarer ` - which is deprecated - and `DependencyDeclarer` needs to be used instead. {code:java} ``` udson.util.HudsonFailedToLoad: org.jvnet.hudson.reactor.ReactorException: java.lang.ClassCastException: org.jenkinsci.plugins.conditionalbuildstep.singlestep.SingleConditionalBuilder cannot be cast to hudson.tasks.Publisher at hudson.WebAppMain$3.run(WebAppMain.java:237) Caused by: org.jvnet.hudson.reactor.ReactorException: java.lang.ClassCastException: org.jenkinsci.plugins.conditionalbuildstep.singlestep.SingleConditionalBuilder cannot be cast to hudson.tasks.Publisher at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:269) at jenkins.InitReactorRunner.run(InitReactorRunner.java:44) at jenkins.model.Jenkins.executeReactor(Jenkins.java:935) at jenkins.model.Jenkins.<init>(Jenkins.java:816) at hudson.model.Hudson.<init>(Hudson.java:83) at hudson.model.Hudson.<init>(Hudson.java:79) at hudson.WebAppMain$3.run(WebAppMain.java:225) Caused by: java.lang.ClassCastException: org.jenkinsci.plugins.conditionalbuildstep.singlestep.SingleConditionalBuilder cannot be cast to hudson.tasks.Publisher at hudson.maven.MavenModule.getDependencyRelevancy(MavenModule.java:675) at hudson.maven.MavenModule.chooseMoreRelevantModule(MavenModule.java:632) at hudson.maven.MavenModule.buildDependencyGraph(MavenModule.java:515) at hudson.model.DependencyGraph.build(DependencyGraph.java:95) at jenkins.model.Jenkins.rebuildDependencyGraph(Jenkins.java:3816) at jenkins.model.Jenkins$20.run(Jenkins.java:2742) at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169) at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282) at jenkins.model.Jenkins$8.runTask(Jenkins.java:924) at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210) at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) ``` {code}

    Jenkins JIRA | 6 months ago | Félix Belzunce Arcos
    udson.util.HudsonFailedToLoad: org.jvnet.hudson.reactor.ReactorException: java.lang.ClassCastException: org.jenkinsci.plugins.conditionalbuildstep.singlestep.SingleConditionalBuilder cannot be cast to hudson.tasks.Publisher
  2. 0

    Basically, I believe this stacktrace is saying that when the maven-plugin is doing [getParent().getPublishers()](https://github.com/jenkinsci/maven-plugin/blob/9c5eb51dda735450a6cc7a59201efe2cd795625a/src/main/java/hudson/maven/MavenModule.java#L675) in Runtime is getting `ClassCastException` because there is something on the list that is not a `Publisher`. I believe the problem is in the [conditional-buildstep-plugin](https://github.com/jenkinsci/conditional-buildstep-plugin/blob/a906535e3d680c7c8ca5d79a3bde9c80d56e9564/src/main/java/org/jenkinsci/plugins/conditionalbuildstep/singlestep/SingleConditionalBuilder.java#L113) which is doing a cast to `DependecyDeclarer ` - which is deprecated - and `DependencyDeclarer` needs to be used instead. {code:java} ``` udson.util.HudsonFailedToLoad: org.jvnet.hudson.reactor.ReactorException: java.lang.ClassCastException: org.jenkinsci.plugins.conditionalbuildstep.singlestep.SingleConditionalBuilder cannot be cast to hudson.tasks.Publisher at hudson.WebAppMain$3.run(WebAppMain.java:237) Caused by: org.jvnet.hudson.reactor.ReactorException: java.lang.ClassCastException: org.jenkinsci.plugins.conditionalbuildstep.singlestep.SingleConditionalBuilder cannot be cast to hudson.tasks.Publisher at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:269) at jenkins.InitReactorRunner.run(InitReactorRunner.java:44) at jenkins.model.Jenkins.executeReactor(Jenkins.java:935) at jenkins.model.Jenkins.<init>(Jenkins.java:816) at hudson.model.Hudson.<init>(Hudson.java:83) at hudson.model.Hudson.<init>(Hudson.java:79) at hudson.WebAppMain$3.run(WebAppMain.java:225) Caused by: java.lang.ClassCastException: org.jenkinsci.plugins.conditionalbuildstep.singlestep.SingleConditionalBuilder cannot be cast to hudson.tasks.Publisher at hudson.maven.MavenModule.getDependencyRelevancy(MavenModule.java:675) at hudson.maven.MavenModule.chooseMoreRelevantModule(MavenModule.java:632) at hudson.maven.MavenModule.buildDependencyGraph(MavenModule.java:515) at hudson.model.DependencyGraph.build(DependencyGraph.java:95) at jenkins.model.Jenkins.rebuildDependencyGraph(Jenkins.java:3816) at jenkins.model.Jenkins$20.run(Jenkins.java:2742) at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169) at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282) at jenkins.model.Jenkins$8.runTask(Jenkins.java:924) at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210) at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) ``` {code}

    Jenkins JIRA | 6 months ago | Félix Belzunce Arcos
    udson.util.HudsonFailedToLoad: org.jvnet.hudson.reactor.ReactorException: java.lang.ClassCastException: org.jenkinsci.plugins.conditionalbuildstep.singlestep.SingleConditionalBuilder cannot be cast to hudson.tasks.Publisher
  3. 0

    Memcached Java客户端2.6.1发布 - 编程语言 - ITeye资讯

    iteye.com | 1 year ago
    java.lang.ClassCastException: cannot be cast to
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    ClassCastException in HandleFactory.getPkgFragmentRoot (355)

    Eclipse Bugzilla | 1 year ago | error-reports-inbox
    java.lang.ClassCastException: cannot be cast to org.eclipse.wst.jsdt.internal.core.PackageFragmentRoot
  6. 0

    Bug ID: JDK-6499662 "java.lang.ClassCastException: cannot be cast to java.lang.String" happens from time to time

    sun.com | 4 months ago
    java.lang.ClassCastException: cannot be cast to java.lang.String

    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

      org.jenkinsci.plugins.conditionalbuildstep.singlestep.SingleConditionalBuilder cannot be cast to hudson.tasks.Publisher

      at hudson.maven.MavenModule.getDependencyRelevancy()
    2. Hudson Maven Embedder
      MavenModule.buildDependencyGraph
      1. hudson.maven.MavenModule.getDependencyRelevancy(MavenModule.java:675)
      2. hudson.maven.MavenModule.chooseMoreRelevantModule(MavenModule.java:632)
      3. hudson.maven.MavenModule.buildDependencyGraph(MavenModule.java:515)
      3 frames
    3. Hudson
      DependencyGraph.build
      1. hudson.model.DependencyGraph.build(DependencyGraph.java:95)
      1 frame
    4. jenkins.model
      Jenkins$20.run
      1. jenkins.model.Jenkins.rebuildDependencyGraph(Jenkins.java:3816)
      2. jenkins.model.Jenkins$20.run(Jenkins.java:2742)
      2 frames
    5. init
      Reactor.runTask
      1. org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
      2. org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282)
      2 frames
    6. jenkins.model
      Jenkins$8.runTask
      1. jenkins.model.Jenkins$8.runTask(Jenkins.java:924)
      1 frame
    7. init
      Reactor$Node.run
      1. org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210)
      2. org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
      2 frames
    8. Java RT
      Thread.run
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      3. java.lang.Thread.run(Unknown Source)
      3 frames