Unknown Error - Urgemt Fix | Selenium Forum
S
Saravanan Vijay Posted on 17/07/2021

I am facing below error while runing script. (Live Project). Please let m know solution for this. 

--------------------------- 

java.lang.ExceptionInInitializerError     at cucumber.deps.com.thoughtworks.xstream.XStream.setupConverters(XStream.java:820)     at cucumber.deps.com.thoughtworks.xstream.XStream.<init>(XStream.java:574)     at cucumber.deps.com.thoughtworks.xstream.XStream.<init>(XStream.java:530)     at cucumber.runtime.xstream.LocalizedXStreams$LocalizedXStream.<init>(LocalizedXStreams.java:50)     at cucumber.runtime.xstream.LocalizedXStreams.newXStream(LocalizedXStreams.java:37)     at cucumber.runtime.xstream.LocalizedXStreams.get(LocalizedXStreams.java:29)     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.runBackground(CucumberScenario.java:59)     at cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:42)     at cucumber.runtime.junit.ExecutionUnitRunner.run(ExecutionUnitRunner.java:102)     at org.junit.runners.Suite.runChild(Suite.java:128)     at org.junit.runners.Suite.runChild(Suite.java:27)     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.ExamplesRunner.run(ExamplesRunner.java:59)     at org.junit.runners.Suite.runChild(Suite.java:128)     at org.junit.runners.Suite.runChild(Suite.java:27)     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.ScenarioOutlineRunner.run(ScenarioOutlineRunner.java:53)     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.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:93)     at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:40)     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:529)     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:756)     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:452)     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210)     at ?.Given User Navigates to OneTrust Application(OneTrustRegression4.feature:4) Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field private final java.util.Comparator java.util.TreeMap.comparator accessible: module java.base does not "opens java.util" to unnamed module @46daef40     at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:357)     at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)     at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:177)     at java.base/java.lang.reflect.Field.setAccessible(Field.java:171)     at cucumber.deps.com.thoughtworks.xstream.core.util.Fields.locate(Fields.java:39)     at cucumber.deps.com.thoughtworks.xstream.converters.collections.TreeMapConverter.<clinit>(TreeMapConverter.java:50)     at cucumber.deps.com.thoughtworks.xstream.XStream.setupConverters(XStream.java:820)     at cucumber.deps.com.thoughtworks.xstream.XStream.<init>(XStream.java:574)     at cucumber.deps.com.thoughtworks.xstream.XStream.<init>(XStream.java:530)     at cucumber.runtime.xstream.LocalizedXStreams$LocalizedXStream.<init>(LocalizedXStreams.java:50)     at cucumber.runtime.xstream.LocalizedXStreams.newXStream(LocalizedXStreams.java:37)     at cucumber.runtime.xstream.LocalizedXStreams.get(LocalizedXStreams.java:29)     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.runBackground(CucumberScenario.java:59)     at cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:42)     at cucumber.runtime.junit.ExecutionUnitRunner.run(ExecutionUnitRunner.java:102)     at org.junit.runners.Suite.runChild(Suite.java:128)     at org.junit.runners.Suite.runChild(Suite.java:27)     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.ExamplesRunner.run(ExamplesRunner.java:59)     at org.junit.runners.Suite.runChild(Suite.java:128)     at org.junit.runners.Suite.runChild(Suite.java:27)     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.ScenarioOutlineRunner.run(ScenarioOutlineRunner.java:53)     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.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:93)     at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:40)     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:529)     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:756)     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:452)     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210)  

A
Ashish Thakur Replied on 20/07/2021

Sorry for late reply.

What is the line of code on which you get this error


S
Saravanan Vijay Replied on 20/07/2021

It's a configuration issue.