java.lang.ClassCastException: java.lang.Double cannot be cast to java.lang.String

Jenkins JIRA | olivier destrebecq | 2 years ago
  1. 0

    This is the error i got in the console for the job when it tried to parse the attached json file. {code} [Cucumber Tests] Parsing results. [Cucumber Tests] parsing cucumber.json ERROR: Build step failed with exception java.lang.ClassCastException: java.lang.Double cannot be cast to java.lang.String at gherkin.JSONParser.step(JSONParser.java:131) at gherkin.JSONParser.parse(JSONParser.java:51) at org.jenkinsci.plugins.cucumber.jsontestsupport.CucumberJSONParser.parse(CucumberJSONParser.java:94) at org.jenkinsci.plugins.cucumber.jsontestsupport.CucumberJSONParser.parse(CucumberJSONParser.java:44) at org.jenkinsci.plugins.cucumber.jsontestsupport.DefaultTestResultParserImpl$ParseResultCallable.invoke(DefaultTestResultParserImpl.java:161) at org.jenkinsci.plugins.cucumber.jsontestsupport.DefaultTestResultParserImpl$ParseResultCallable.invoke(DefaultTestResultParserImpl.java:107) at hudson.FilePath.act(FilePath.java:989) at hudson.FilePath.act(FilePath.java:967) at org.jenkinsci.plugins.cucumber.jsontestsupport.DefaultTestResultParserImpl.parse(DefaultTestResultParserImpl.java:101) at org.jenkinsci.plugins.cucumber.jsontestsupport.CucumberJSONParser.parse(CucumberJSONParser.java:116) at org.jenkinsci.plugins.cucumber.jsontestsupport.CucumberTestResultArchiver.perform(CucumberTestResultArchiver.java:93) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:761) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:721) at hudson.model.Build$BuildExecution.post2(Build.java:183) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:670) at hudson.model.Run.execute(Run.java:1766) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:374) Build step 'Publish Cucumber test result report' marked build as failure {code}

    Jenkins JIRA | 2 years ago | olivier destrebecq
    java.lang.ClassCastException: java.lang.Double cannot be cast to java.lang.String
  2. 0

    This is the error i got in the console for the job when it tried to parse the attached json file. {code} [Cucumber Tests] Parsing results. [Cucumber Tests] parsing cucumber.json ERROR: Build step failed with exception java.lang.ClassCastException: java.lang.Double cannot be cast to java.lang.String at gherkin.JSONParser.step(JSONParser.java:131) at gherkin.JSONParser.parse(JSONParser.java:51) at org.jenkinsci.plugins.cucumber.jsontestsupport.CucumberJSONParser.parse(CucumberJSONParser.java:94) at org.jenkinsci.plugins.cucumber.jsontestsupport.CucumberJSONParser.parse(CucumberJSONParser.java:44) at org.jenkinsci.plugins.cucumber.jsontestsupport.DefaultTestResultParserImpl$ParseResultCallable.invoke(DefaultTestResultParserImpl.java:161) at org.jenkinsci.plugins.cucumber.jsontestsupport.DefaultTestResultParserImpl$ParseResultCallable.invoke(DefaultTestResultParserImpl.java:107) at hudson.FilePath.act(FilePath.java:989) at hudson.FilePath.act(FilePath.java:967) at org.jenkinsci.plugins.cucumber.jsontestsupport.DefaultTestResultParserImpl.parse(DefaultTestResultParserImpl.java:101) at org.jenkinsci.plugins.cucumber.jsontestsupport.CucumberJSONParser.parse(CucumberJSONParser.java:116) at org.jenkinsci.plugins.cucumber.jsontestsupport.CucumberTestResultArchiver.perform(CucumberTestResultArchiver.java:93) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:761) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:721) at hudson.model.Build$BuildExecution.post2(Build.java:183) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:670) at hudson.model.Run.execute(Run.java:1766) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:374) Build step 'Publish Cucumber test result report' marked build as failure {code}

    Jenkins JIRA | 2 years ago | olivier destrebecq
    java.lang.ClassCastException: java.lang.Double cannot be cast to java.lang.String
  3. 0

    [JIRA] [cucumber-testresult-plugin] (JENKINS-33041) Could not parse resulting json

    Google Groups | 10 months ago | francois.benaiteau+jenkins@gmail.com (JIRA)
    java.lang.ClassCastException: gherkin.deps.com.google.gson.internal.StringMap cannot be cast to java.lang.String
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    I am using cucumber 2.3.2 (ruby) to run my tests and generate the tests' results. I am getting the following error: ``` ERROR: Build step failed with exception java.lang.ClassCastException: gherkin.deps.com.google.gson.internal.StringMap cannot be cast to java.lang.String at gherkin.JSONParser.getString(JSONParser.java:225) at gherkin.JSONParser.location(JSONParser.java:208) at gherkin.JSONParser.step(JSONParser.java:110) at gherkin.JSONParser.parse(JSONParser.java:51) at org.jenkinsci.plugins.cucumber.jsontestsupport.CucumberJSONParser.parse(CucumberJSONParser.java:77) at org.jenkinsci.plugins.cucumber.jsontestsupport.CucumberJSONParser.parse(CucumberJSONParser.java:43) at org.jenkinsci.plugins.cucumber.jsontestsupport.DefaultTestResultParserImpl$ParseResultCallable.invoke(DefaultTestResultParserImpl.java:159) at org.jenkinsci.plugins.cucumber.jsontestsupport.DefaultTestResultParserImpl$ParseResultCallable.invoke(DefaultTestResultParserImpl.java:105) at hudson.FilePath.act(FilePath.java:990) at hudson.FilePath.act(FilePath.java:968) at org.jenkinsci.plugins.cucumber.jsontestsupport.DefaultTestResultParserImpl.parse(DefaultTestResultParserImpl.java:99) at org.jenkinsci.plugins.cucumber.jsontestsupport.CucumberJSONParser.parse(CucumberJSONParser.java:99) at org.jenkinsci.plugins.cucumber.jsontestsupport.CucumberTestResultArchiver.perform(CucumberTestResultArchiver.java:112) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723) at hudson.model.Build$BuildExecution.post2(Build.java:185) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668) at hudson.model.Run.execute(Run.java:1763) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) Build step 'Publish Cucumber test result report' marked build as failure Finished: FAILURE ``` Attached is the json file.

    Jenkins JIRA | 10 months ago | Fran├žois Benaiteau
    java.lang.ClassCastException: gherkin.deps.com.google.gson.internal.StringMap cannot be cast to java.lang.String
  6. 0

    I am using cucumber 2.3.2 (ruby) to run my tests and generate the tests' results. I am getting the following error: ``` ERROR: Build step failed with exception java.lang.ClassCastException: gherkin.deps.com.google.gson.internal.StringMap cannot be cast to java.lang.String at gherkin.JSONParser.getString(JSONParser.java:225) at gherkin.JSONParser.location(JSONParser.java:208) at gherkin.JSONParser.step(JSONParser.java:110) at gherkin.JSONParser.parse(JSONParser.java:51) at org.jenkinsci.plugins.cucumber.jsontestsupport.CucumberJSONParser.parse(CucumberJSONParser.java:77) at org.jenkinsci.plugins.cucumber.jsontestsupport.CucumberJSONParser.parse(CucumberJSONParser.java:43) at org.jenkinsci.plugins.cucumber.jsontestsupport.DefaultTestResultParserImpl$ParseResultCallable.invoke(DefaultTestResultParserImpl.java:159) at org.jenkinsci.plugins.cucumber.jsontestsupport.DefaultTestResultParserImpl$ParseResultCallable.invoke(DefaultTestResultParserImpl.java:105) at hudson.FilePath.act(FilePath.java:990) at hudson.FilePath.act(FilePath.java:968) at org.jenkinsci.plugins.cucumber.jsontestsupport.DefaultTestResultParserImpl.parse(DefaultTestResultParserImpl.java:99) at org.jenkinsci.plugins.cucumber.jsontestsupport.CucumberJSONParser.parse(CucumberJSONParser.java:99) at org.jenkinsci.plugins.cucumber.jsontestsupport.CucumberTestResultArchiver.perform(CucumberTestResultArchiver.java:112) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723) at hudson.model.Build$BuildExecution.post2(Build.java:185) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668) at hudson.model.Run.execute(Run.java:1763) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) Build step 'Publish Cucumber test result report' marked build as failure Finished: FAILURE ``` Attached is the json file.

    Jenkins JIRA | 10 months ago | Fran├žois Benaiteau
    java.lang.ClassCastException: gherkin.deps.com.google.gson.internal.StringMap 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

      java.lang.Double cannot be cast to java.lang.String

      at gherkin.JSONParser.step()
    2. Gherkin
      JSONParser.parse
      1. gherkin.JSONParser.step(JSONParser.java:131)
      2. gherkin.JSONParser.parse(JSONParser.java:51)
      2 frames
    3. org.jenkinsci.plugins
      DefaultTestResultParserImpl$ParseResultCallable.invoke
      1. org.jenkinsci.plugins.cucumber.jsontestsupport.CucumberJSONParser.parse(CucumberJSONParser.java:94)
      2. org.jenkinsci.plugins.cucumber.jsontestsupport.CucumberJSONParser.parse(CucumberJSONParser.java:44)
      3. org.jenkinsci.plugins.cucumber.jsontestsupport.DefaultTestResultParserImpl$ParseResultCallable.invoke(DefaultTestResultParserImpl.java:161)
      4. org.jenkinsci.plugins.cucumber.jsontestsupport.DefaultTestResultParserImpl$ParseResultCallable.invoke(DefaultTestResultParserImpl.java:107)
      4 frames
    4. Hudson
      FilePath.act
      1. hudson.FilePath.act(FilePath.java:989)
      2. hudson.FilePath.act(FilePath.java:967)
      2 frames
    5. org.jenkinsci.plugins
      CucumberTestResultArchiver.perform
      1. org.jenkinsci.plugins.cucumber.jsontestsupport.DefaultTestResultParserImpl.parse(DefaultTestResultParserImpl.java:101)
      2. org.jenkinsci.plugins.cucumber.jsontestsupport.CucumberJSONParser.parse(CucumberJSONParser.java:116)
      3. org.jenkinsci.plugins.cucumber.jsontestsupport.CucumberTestResultArchiver.perform(CucumberTestResultArchiver.java:93)
      3 frames
    6. Hudson
      Executor.run
      1. hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      2. hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:761)
      3. hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:721)
      4. hudson.model.Build$BuildExecution.post2(Build.java:183)
      5. hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:670)
      6. hudson.model.Run.execute(Run.java:1766)
      7. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      8. hudson.model.ResourceController.execute(ResourceController.java:98)
      9. hudson.model.Executor.run(Executor.java:374)
      9 frames