java.lang.ClassCastException

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


Solutions on the web20150

Solution icon of coderanch
via Coderanch by Henry Wong, 10 months ago
java.lang.Integer cannot be cast to java.lang.String

Solution icon of bugzilla
via Eclipse Bugzilla by rileypb, 1 year ago
java.lang.Integer cannot be cast to java.lang.String

Solution icon of bugzilla
java.lang.String cannot be cast to java.lang.Integer

Solution icon of bugzilla
via Eclipse Bugzilla by g.watson, 1 year ago
java.lang.Integer cannot be cast to java.lang.String

Solution icon of bugzilla
via Eclipse Bugzilla by cvgaviao, 1 year ago
java.lang.String cannot be cast to java.lang.Integer

Solution icon of bugzilla
java.lang.Integer cannot be cast to java.lang.String

Solution icon of github
via GitHub by MisterY
, 11 months ago
java.lang.String cannot be cast to java.lang.Integer

Solution icon of github
via GitHub by Plumeex
, 1 year ago
java.lang.Integer cannot be cast to java.lang.String

Solution icon of github
via GitHub by r-mckay
, 8 months ago
java.lang.String cannot be cast to java.lang.Integer

Solution icon of github
via GitHub by jcornaz
, 12 hours ago
java.lang.Integer cannot be cast to java.lang.String

Stack trace

  • java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer at scala.runtime.BoxesRunTime.unboxToInt(BoxesRunTime.java:101) at TestSteps.$anonfun$new$1$adapted(TestSteps.scala:8) at cucumber.api.scala.ScalaDsl$StepBody$$anonfun$apply$2.applyOrElse(ScalaDsl.scala:98) at cucumber.api.scala.ScalaDsl$StepBody$$anonfun$apply$2.applyOrElse(ScalaDsl.scala:96) at scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:34) at cucumber.runtime.scala.ScalaStepDefinition.execute(ScalaStepDefinition.scala:71) at cucumber.runtime.StepDefinitionMatch.runStep(StepDefinitionMatch.java:37) at cucumber.runtime.Runtime.runStep(Runtime.java:300) at cucumber.runtime.model.StepContainer.runStep(StepContainer.java:44) at cucumber.runtime.model.StepContainer.runSteps(StepContainer.java:39) at cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:44) at cucumber.runtime.junit.ExecutionUnitRunner.run(ExecutionUnitRunner.java:102) at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:63) at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:18) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at cucumber.runtime.junit.FeatureRunner.run(FeatureRunner.java:70) at cucumber.api.junit.Cucumber.runChild(Cucumber.java:95) at cucumber.api.junit.Cucumber.runChild(Cucumber.java:38) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at cucumber.api.junit.Cucumber.run(Cucumber.java:100) at org.junit.runner.JUnitCore.run(JUnitCore.java:137) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68) at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:51) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:237) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

2 times, 2 months ago
Once, 4 months ago
2 times, 11 months ago
4 times, 1 year ago
Once, 4 months ago
4 more bugmates