java.lang.IncompatibleClassChangeError: the number of constructors during runtime and compile time for java.lang.RuntimeException do not match. Expected 5 but got 4

Jenkins JIRA | Tianming Zhao | 3 years ago
  1. 0

    When using job-dsl-plugin 1.22, I forgot to give the job a name, and I ended up getting error message as below. I would suggest to output a more helpful error message which, in this case, should reveal where exactly the problem was or prompt me more helpful information. As a newbie to Jenkins plugins, the following error message is very difficult for me to figure out the root cause. FATAL: the number of constructors during runtime and compile time for java.lang.RuntimeException do not match. Expected 5 but got 4 java.lang.IncompatibleClassChangeError: the number of constructors during runtime and compile time for java.lang.RuntimeException do not match. Expected 5 but got 4 at groovy.lang.MetaClassImpl.selectConstructorAndTransformArguments(MetaClassImpl.java:1381) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.selectConstructorAndTransformArguments(ScriptBytecodeAdapter.java:234) at javaposse.jobdsl.dsl.NameNotProvidedException.<init>(NameNotProvidedException.groovy:8) at javaposse.jobdsl.dsl.AbstractJobManagement.validateNameArg(AbstractJobManagement.java:67) at javaposse.jobdsl.dsl.AbstractJobManagement.validateUpdateArgs(AbstractJobManagement.java:58) at javaposse.jobdsl.plugin.JenkinsJobManagement.createOrUpdateConfig(JenkinsJobManagement.java:99) at javaposse.jobdsl.dsl.DslScriptLoader.extractGeneratedJobs(DslScriptLoader.java:122) at javaposse.jobdsl.dsl.DslScriptLoader.runDslEngine(DslScriptLoader.java:98) at javaposse.jobdsl.plugin.ExecuteDslScripts.perform(ExecuteDslScripts.java:159) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804) 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:586) at hudson.model.Run.execute(Run.java:1575) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:241)

    Jenkins JIRA | 3 years ago | Tianming Zhao
    java.lang.IncompatibleClassChangeError: the number of constructors during runtime and compile time for java.lang.RuntimeException do not match. Expected 5 but got 4
  2. 0

    When using job-dsl-plugin 1.22, I forgot to give the job a name, and I ended up getting error message as below. I would suggest to output a more helpful error message which, in this case, should reveal where exactly the problem was or prompt me more helpful information. As a newbie to Jenkins plugins, the following error message is very difficult for me to figure out the root cause. FATAL: the number of constructors during runtime and compile time for java.lang.RuntimeException do not match. Expected 5 but got 4 java.lang.IncompatibleClassChangeError: the number of constructors during runtime and compile time for java.lang.RuntimeException do not match. Expected 5 but got 4 at groovy.lang.MetaClassImpl.selectConstructorAndTransformArguments(MetaClassImpl.java:1381) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.selectConstructorAndTransformArguments(ScriptBytecodeAdapter.java:234) at javaposse.jobdsl.dsl.NameNotProvidedException.<init>(NameNotProvidedException.groovy:8) at javaposse.jobdsl.dsl.AbstractJobManagement.validateNameArg(AbstractJobManagement.java:67) at javaposse.jobdsl.dsl.AbstractJobManagement.validateUpdateArgs(AbstractJobManagement.java:58) at javaposse.jobdsl.plugin.JenkinsJobManagement.createOrUpdateConfig(JenkinsJobManagement.java:99) at javaposse.jobdsl.dsl.DslScriptLoader.extractGeneratedJobs(DslScriptLoader.java:122) at javaposse.jobdsl.dsl.DslScriptLoader.runDslEngine(DslScriptLoader.java:98) at javaposse.jobdsl.plugin.ExecuteDslScripts.perform(ExecuteDslScripts.java:159) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804) 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:586) at hudson.model.Run.execute(Run.java:1575) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:241)

    Jenkins JIRA | 3 years ago | Tianming Zhao
    java.lang.IncompatibleClassChangeError: the number of constructors during runtime and compile time for java.lang.RuntimeException do not match. Expected 5 but got 4
  3. 0

    [JENKINS-22615] Provide more helpful error message when missing required field - Jenkins JIRA

    jenkins-ci.org | 4 months ago
    java.lang.IncompatibleClassChangeError: the number of constructors during runtime and compile time for java.lang.RuntimeException do not match. Expected 5 but got 4
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    pride do fails with ugly callstack

    GitHub | 3 years ago | agazso
    java.lang.IncompatibleClassChangeError: the number of constructors during runtime and compile time for java.lang.RuntimeException do not match. Expected 5 but got 4
  6. 0

    Gradle exception for cargo plugin

    Stack Overflow | 2 years ago | Priya
    java.lang.IncompatibleClassChangeError: the number of constructors during runtime and compile time for com.bmuschko.gradle.cargo.property.PropertyDataType do not match. Expected -1 but got 2

    4 unregistered visitors
    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.IncompatibleClassChangeError

      the number of constructors during runtime and compile time for java.lang.RuntimeException do not match. Expected 5 but got 4

      at groovy.lang.MetaClassImpl.selectConstructorAndTransformArguments()
    2. Groovy
      ScriptBytecodeAdapter.selectConstructorAndTransformArguments
      1. groovy.lang.MetaClassImpl.selectConstructorAndTransformArguments(MetaClassImpl.java:1381)
      2. org.codehaus.groovy.runtime.ScriptBytecodeAdapter.selectConstructorAndTransformArguments(ScriptBytecodeAdapter.java:234)
      2 frames
    3. javaposse.jobdsl.dsl
      AbstractJobManagement.validateUpdateArgs
      1. javaposse.jobdsl.dsl.NameNotProvidedException.<init>(NameNotProvidedException.groovy:8)
      2. javaposse.jobdsl.dsl.AbstractJobManagement.validateNameArg(AbstractJobManagement.java:67)
      3. javaposse.jobdsl.dsl.AbstractJobManagement.validateUpdateArgs(AbstractJobManagement.java:58)
      3 frames
    4. javaposse.jobdsl.plugin
      JenkinsJobManagement.createOrUpdateConfig
      1. javaposse.jobdsl.plugin.JenkinsJobManagement.createOrUpdateConfig(JenkinsJobManagement.java:99)
      1 frame
    5. javaposse.jobdsl.dsl
      DslScriptLoader.runDslEngine
      1. javaposse.jobdsl.dsl.DslScriptLoader.extractGeneratedJobs(DslScriptLoader.java:122)
      2. javaposse.jobdsl.dsl.DslScriptLoader.runDslEngine(DslScriptLoader.java:98)
      2 frames
    6. javaposse.jobdsl.plugin
      ExecuteDslScripts.perform
      1. javaposse.jobdsl.plugin.ExecuteDslScripts.perform(ExecuteDslScripts.java:159)
      1 frame
    7. Hudson
      Executor.run
      1. hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
      2. hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804)
      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:586)
      6. hudson.model.Run.execute(Run.java:1575)
      7. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      8. hudson.model.ResourceController.execute(ResourceController.java:88)
      9. hudson.model.Executor.run(Executor.java:241)
      9 frames