java.lang.ClassCastException: hudson.model.StringParameterValue cannot be cast to org.jenkinsci.plugins.jobgenerator.parameters.GeneratorKeyValueParameterValue

Jenkins JIRA | Morne Joubert | 3 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    I can trigger a generator job by pointing it to a saved properties file. BUT if i use the Factories option to trigger multiple jobs from multiple property files then i get: FATAL: hudson.model.StringParameterValue cannot be cast to org.jenkinsci.plugins.jobgenerator.parameters.GeneratorKeyValueParameterValue java.lang.ClassCastException: hudson.model.StringParameterValue cannot be cast to org.jenkinsci.plugins.jobgenerator.parameters.GeneratorKeyValueParameterValue at org.jenkinsci.plugins.jobgenerator.GeneratorRun.expand(GeneratorRun.java:164) at org.jenkinsci.plugins.jobgenerator.GeneratorRun$ExpandVarsVisitor.visit(GeneratorRun.java:799) at org.dom4j.tree.AbstractText.accept(AbstractText.java:46) at org.dom4j.tree.AbstractElement.accept(AbstractElement.java:208) at org.dom4j.tree.AbstractElement.accept(AbstractElement.java:208) at org.dom4j.tree.AbstractElement.accept(AbstractElement.java:208) at org.dom4j.tree.AbstractElement.accept(AbstractElement.java:208) at org.dom4j.tree.AbstractElement.accept(AbstractElement.java:208) at org.dom4j.tree.AbstractElement.accept(AbstractElement.java:208) at org.dom4j.tree.AbstractElement.accept(AbstractElement.java:208) at org.dom4j.tree.AbstractElement.accept(AbstractElement.java:208) at org.dom4j.tree.AbstractElement.accept(AbstractElement.java:208) at org.dom4j.tree.AbstractElement.accept(AbstractElement.java:208) at org.dom4j.tree.AbstractElement.accept(AbstractElement.java:208) at org.dom4j.tree.AbstractDocument.accept(AbstractDocument.java:130) at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.doRun(GeneratorRun.java:339) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:535) at hudson.model.Run.execute(Run.java:1732) at org.jenkinsci.plugins.jobgenerator.GeneratorRun.run(GeneratorRun.java:284) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:234) at hudson.model.OneOffExecutor.run(OneOffExecutor.java:43)

    Jenkins JIRA | 3 years ago | Morne Joubert
    java.lang.ClassCastException: hudson.model.StringParameterValue cannot be cast to org.jenkinsci.plugins.jobgenerator.parameters.GeneratorKeyValueParameterValue
  2. 0

    I can trigger a generator job by pointing it to a saved properties file. BUT if i use the Factories option to trigger multiple jobs from multiple property files then i get: FATAL: hudson.model.StringParameterValue cannot be cast to org.jenkinsci.plugins.jobgenerator.parameters.GeneratorKeyValueParameterValue java.lang.ClassCastException: hudson.model.StringParameterValue cannot be cast to org.jenkinsci.plugins.jobgenerator.parameters.GeneratorKeyValueParameterValue at org.jenkinsci.plugins.jobgenerator.GeneratorRun.expand(GeneratorRun.java:164) at org.jenkinsci.plugins.jobgenerator.GeneratorRun$ExpandVarsVisitor.visit(GeneratorRun.java:799) at org.dom4j.tree.AbstractText.accept(AbstractText.java:46) at org.dom4j.tree.AbstractElement.accept(AbstractElement.java:208) at org.dom4j.tree.AbstractElement.accept(AbstractElement.java:208) at org.dom4j.tree.AbstractElement.accept(AbstractElement.java:208) at org.dom4j.tree.AbstractElement.accept(AbstractElement.java:208) at org.dom4j.tree.AbstractElement.accept(AbstractElement.java:208) at org.dom4j.tree.AbstractElement.accept(AbstractElement.java:208) at org.dom4j.tree.AbstractElement.accept(AbstractElement.java:208) at org.dom4j.tree.AbstractElement.accept(AbstractElement.java:208) at org.dom4j.tree.AbstractElement.accept(AbstractElement.java:208) at org.dom4j.tree.AbstractElement.accept(AbstractElement.java:208) at org.dom4j.tree.AbstractElement.accept(AbstractElement.java:208) at org.dom4j.tree.AbstractDocument.accept(AbstractDocument.java:130) at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.doRun(GeneratorRun.java:339) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:535) at hudson.model.Run.execute(Run.java:1732) at org.jenkinsci.plugins.jobgenerator.GeneratorRun.run(GeneratorRun.java:284) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:234) at hudson.model.OneOffExecutor.run(OneOffExecutor.java:43)

    Jenkins JIRA | 3 years ago | Morne Joubert
    java.lang.ClassCastException: hudson.model.StringParameterValue cannot be cast to org.jenkinsci.plugins.jobgenerator.parameters.GeneratorKeyValueParameterValue

    Root Cause Analysis

    1. java.lang.ClassCastException

      hudson.model.StringParameterValue cannot be cast to org.jenkinsci.plugins.jobgenerator.parameters.GeneratorKeyValueParameterValue

      at org.jenkinsci.plugins.jobgenerator.GeneratorRun.expand()
    2. org.jenkinsci.plugins
      GeneratorRun$ExpandVarsVisitor.visit
      1. org.jenkinsci.plugins.jobgenerator.GeneratorRun.expand(GeneratorRun.java:164)
      2. org.jenkinsci.plugins.jobgenerator.GeneratorRun$ExpandVarsVisitor.visit(GeneratorRun.java:799)
      2 frames
    3. dom4j
      AbstractDocument.accept
      1. org.dom4j.tree.AbstractText.accept(AbstractText.java:46)
      2. org.dom4j.tree.AbstractElement.accept(AbstractElement.java:208)
      3. org.dom4j.tree.AbstractElement.accept(AbstractElement.java:208)
      4. org.dom4j.tree.AbstractElement.accept(AbstractElement.java:208)
      5. org.dom4j.tree.AbstractElement.accept(AbstractElement.java:208)
      6. org.dom4j.tree.AbstractElement.accept(AbstractElement.java:208)
      7. org.dom4j.tree.AbstractElement.accept(AbstractElement.java:208)
      8. org.dom4j.tree.AbstractElement.accept(AbstractElement.java:208)
      9. org.dom4j.tree.AbstractElement.accept(AbstractElement.java:208)
      10. org.dom4j.tree.AbstractElement.accept(AbstractElement.java:208)
      11. org.dom4j.tree.AbstractElement.accept(AbstractElement.java:208)
      12. org.dom4j.tree.AbstractElement.accept(AbstractElement.java:208)
      13. org.dom4j.tree.AbstractDocument.accept(AbstractDocument.java:130)
      13 frames
    4. org.jenkinsci.plugins
      GeneratorRun$GeneratorImpl.doRun
      1. org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.doRun(GeneratorRun.java:339)
      1 frame
    5. Hudson
      Run.execute
      1. hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:535)
      2. hudson.model.Run.execute(Run.java:1732)
      2 frames
    6. org.jenkinsci.plugins
      GeneratorRun.run
      1. org.jenkinsci.plugins.jobgenerator.GeneratorRun.run(GeneratorRun.java:284)
      1 frame
    7. Hudson
      OneOffExecutor.run
      1. hudson.model.ResourceController.execute(ResourceController.java:88)
      2. hudson.model.Executor.run(Executor.java:234)
      3. hudson.model.OneOffExecutor.run(OneOffExecutor.java:43)
      3 frames