java.lang.ClassCastException: org.codehaus.groovy.runtime.InvokerHelper$2 cannot be cast to javaposse.jobdsl.dsl.JobParent

Jenkins JIRA | Marc Esher | 2 years ago
  1. 0

    I'm trying to use the example project at https://github.com/sheehan/job-dsl-gradle-example to create jobs. 1. I created a new job that uses this repo as the SCM. 2. Add an Invoke Gradle build step, use gradle wrapper, invoking clean test workspace 3. Add a 'process job dsl' build step, using 'build/workspace/**/*.groovy' as the scripts Result: [Gradle] - Launching build. [workspace] $ /home/marc/.jenkins/jobs/job-dsl-example-thingie/workspace/gradlew clean test workspace :clean :compileJava UP-TO-DATE :compileGroovy :processResources UP-TO-DATE :classes :compileTestJava UP-TO-DATE :compileTestGroovy :processTestResources UP-TO-DATE :testClasses :test :workspace BUILD SUCCESSFUL Total time: 7.989 secs Build step 'Invoke Gradle script' changed build result to SUCCESS FATAL: org.codehaus.groovy.runtime.InvokerHelper$2 cannot be cast to javaposse.jobdsl.dsl.JobParent java.lang.ClassCastException: org.codehaus.groovy.runtime.InvokerHelper$2 cannot be cast to javaposse.jobdsl.dsl.JobParent at javaposse.jobdsl.dsl.DslScriptLoader.runDslEngineForParent(DslScriptLoader.java:64) at javaposse.jobdsl.dsl.DslScriptLoader.runDslEngine(DslScriptLoader.java:89) at javaposse.jobdsl.plugin.ExecuteDslScripts.perform(ExecuteDslScripts.java:177) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:770) at hudson.model.Build$BuildExecution.build(Build.java:199) at hudson.model.Build$BuildExecution.doRun(Build.java:160) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:533) at hudson.model.Run.execute(Run.java:1759) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:89) at hudson.model.Executor.run(Executor.java:240)

    Jenkins JIRA | 2 years ago | Marc Esher
    java.lang.ClassCastException: org.codehaus.groovy.runtime.InvokerHelper$2 cannot be cast to javaposse.jobdsl.dsl.JobParent
  2. 0

    I'm trying to use the example project at https://github.com/sheehan/job-dsl-gradle-example to create jobs. 1. I created a new job that uses this repo as the SCM. 2. Add an Invoke Gradle build step, use gradle wrapper, invoking clean test workspace 3. Add a 'process job dsl' build step, using 'build/workspace/**/*.groovy' as the scripts Result: [Gradle] - Launching build. [workspace] $ /home/marc/.jenkins/jobs/job-dsl-example-thingie/workspace/gradlew clean test workspace :clean :compileJava UP-TO-DATE :compileGroovy :processResources UP-TO-DATE :classes :compileTestJava UP-TO-DATE :compileTestGroovy :processTestResources UP-TO-DATE :testClasses :test :workspace BUILD SUCCESSFUL Total time: 7.989 secs Build step 'Invoke Gradle script' changed build result to SUCCESS FATAL: org.codehaus.groovy.runtime.InvokerHelper$2 cannot be cast to javaposse.jobdsl.dsl.JobParent java.lang.ClassCastException: org.codehaus.groovy.runtime.InvokerHelper$2 cannot be cast to javaposse.jobdsl.dsl.JobParent at javaposse.jobdsl.dsl.DslScriptLoader.runDslEngineForParent(DslScriptLoader.java:64) at javaposse.jobdsl.dsl.DslScriptLoader.runDslEngine(DslScriptLoader.java:89) at javaposse.jobdsl.plugin.ExecuteDslScripts.perform(ExecuteDslScripts.java:177) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:770) at hudson.model.Build$BuildExecution.build(Build.java:199) at hudson.model.Build$BuildExecution.doRun(Build.java:160) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:533) at hudson.model.Run.execute(Run.java:1759) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:89) at hudson.model.Executor.run(Executor.java:240)

    Jenkins JIRA | 2 years ago | Marc Esher
    java.lang.ClassCastException: org.codehaus.groovy.runtime.InvokerHelper$2 cannot be cast to javaposse.jobdsl.dsl.JobParent
  3. 0

    Error creating jobs with job-dsl-plugin example for Grails and Gradle builders

    GitHub | 2 years ago | marcesher
    java.lang.ClassCastException: org.codehaus.groovy.runtime.InvokerHelper$2 cannot be cast to javaposse.jobdsl.dsl.JobParent
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    3.5.8 commit offset warn and printWaterMark error ( castRunnable exception null point )

    GitHub | 2 months ago | a11123939
    java.lang.ClassCastException: com.alibaba.rocketmq.broker.processor.PullMessageProcessor$2 cannot be cast to com.alibaba.rocketmq.remoting.netty.RequestTask

    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.codehaus.groovy.runtime.InvokerHelper$2 cannot be cast to javaposse.jobdsl.dsl.JobParent

      at javaposse.jobdsl.dsl.DslScriptLoader.runDslEngineForParent()
    2. javaposse.jobdsl.dsl
      DslScriptLoader.runDslEngine
      1. javaposse.jobdsl.dsl.DslScriptLoader.runDslEngineForParent(DslScriptLoader.java:64)
      2. javaposse.jobdsl.dsl.DslScriptLoader.runDslEngine(DslScriptLoader.java:89)
      2 frames
    3. javaposse.jobdsl.plugin
      ExecuteDslScripts.perform
      1. javaposse.jobdsl.plugin.ExecuteDslScripts.perform(ExecuteDslScripts.java:177)
      1 frame
    4. Hudson
      Executor.run
      1. hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      2. hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:770)
      3. hudson.model.Build$BuildExecution.build(Build.java:199)
      4. hudson.model.Build$BuildExecution.doRun(Build.java:160)
      5. hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:533)
      6. hudson.model.Run.execute(Run.java:1759)
      7. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      8. hudson.model.ResourceController.execute(ResourceController.java:89)
      9. hudson.model.Executor.run(Executor.java:240)
      9 frames