How to fix cucumber.runtime.CucumberException: java.lang.NoSuchMethodException

0

I have a Maven project, in the IDE Intellij. I use Serenity and Cucumber and when executing the project I get the following:

XXX Created runtime cucumber.runtime.RuntimeOptions@477b4cdf
cucumber.runtime.CucumberException: java.lang.NoSuchMethodException: 
cucumber.runtime.SerenityBackend.<init>(cucumber.runtime.io.ResourceLoader, 
io.cucumber.stepexpression.TypeRegistry)

at cucumber.runtime.Reflections.newInstance(Reflections.java:53)
at cucumber.runtime.Reflections.instantiateSubclasses(Reflections.java:35)
at cucumber.runtime.Runtime.loadBackends(Runtime.java:89)
at cucumber.runtime.Runtime.<init>(Runtime.java:42)
at net.serenitybdd.cucumber.CucumberWithSerenityRuntime.createSerenityEnabledRuntime(CucumberWithSerenityRuntime.java:38)
at net.serenitybdd.cucumber.CucumberWithSerenityRuntime.using(CucumberWithSerenityRuntime.java:28)
at net.serenitybdd.cucumber.CucumberWithSerenity.createRuntime(CucumberWithSerenity.java:58)
at cucumber.api.junit.Cucumber.<init>(Cucumber.java:63)
at net.serenitybdd.cucumber.CucumberWithSerenity.<init>(CucumberWithSerenity.java:39)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:104)
at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:86)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:33)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:49)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
Caused by: java.lang.NoSuchMethodException: cucumber.runtime.SerenityBackend.<init>(cucumber.runtime.io.ResourceLoader, io.cucumber.stepexpression.TypeRegistry)
at java.lang.Class.getConstructor0(Class.java:3082)
at java.lang.Class.getConstructor(Class.java:1825)
at cucumber.runtime.Reflections.newInstance(Reflections.java:45)
... 22 more


Process finished with exit code -1

I have installed the Cucumber for Java plugin, the Gherkin plugin

The structure of my project is as follows

Thank you very much for the help you can give me.

    
asked by Carolina rios tejada 28.05.2018 в 20:05
source

0 answers