Serenity+Cucumber 6 using Kotlin+Maven throws NPE: No BaseStepListener has been registered
Opened this issue · 1 comments
arrin69 commented
Hallo daar,
We are using Serenity with Kotlin with version 4.8.0; however recently I started to upgrade it to Cucumber 6.6.0. And I am indeed following version compatibility table from here.
I have also tried with starter project(using screenplay) in kotlin and yes, it works like charm. However, with our classic step definitions project it is throwing us this error.
22:47:47.236 [main] INFO - Test Suite Started: This is a demo feature to run Serenity With Kotlin
22:47:48.525 [main] ERROR n.thucydides.core.steps.StepEventBus - No base step listener registered - this is generally a bad sign.
Oct 05, 2020 10:47:48 PM io.cucumber.core.runtime.Runtime run
SEVERE: Exception while executing pickle
java.util.concurrent.ExecutionException: java.lang.NullPointerException: No BaseStepListener has been registered
at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
at io.cucumber.core.runtime.Runtime.run(Runtime.java:93)
at net.serenitybdd.cucumber.cli.Main.run(Main.java:27)
at net.serenitybdd.cucumber.cli.Main.main(Main.java:18)
Caused by: java.lang.NullPointerException: No BaseStepListener has been registered
at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:900)
at net.thucydides.core.steps.StepEventBus.getBaseStepListener(StepEventBus.java:137)
at cucumber.runtime.SerenityObjectFactory.newInstance(SerenityObjectFactory.java:77)
at cucumber.runtime.SerenityObjectFactory.cacheNewInstance(SerenityObjectFactory.java:58)
at cucumber.runtime.SerenityObjectFactory.getInstance(SerenityObjectFactory.java:48)
at io.cucumber.java8.Java8Backend.buildWorld(Java8Backend.java:64)
at io.cucumber.core.runner.Runner.buildBackendWorlds(Runner.java:99)
at io.cucumber.core.runner.Runner.runPickle(Runner.java:65)
at io.cucumber.core.runtime.Runtime.lambda$execute$5(Runtime.java:110)
at io.cucumber.core.runtime.CucumberExecutionContext.runTestCase(CucumberExecutionContext.java:117)
at io.cucumber.core.runtime.Runtime.lambda$execute$6(Runtime.java:110)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at io.cucumber.core.runtime.Runtime$SameThreadExecutorService.execute(Runtime.java:233)
at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118)
at io.cucumber.core.runtime.Runtime.lambda$run$2(Runtime.java:86)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
at java.base/java.util.stream.SliceOps$1$1.accept(SliceOps.java:199)
at java.base/java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1631)
at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:127)
at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:502)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:488)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
at io.cucumber.core.runtime.Runtime.run(Runtime.java:87)
... 2 more
Exception in thread "main" io.cucumber.core.exception.CucumberException: java.lang.NullPointerException: No BaseStepListener has been registered
at io.cucumber.core.runtime.CucumberExecutionContext.getException(CucumberExecutionContext.java:82)
at io.cucumber.core.runtime.Runtime.run(Runtime.java:103)
at net.serenitybdd.cucumber.cli.Main.run(Main.java:27)
at net.serenitybdd.cucumber.cli.Main.main(Main.java:18)
Caused by: java.lang.NullPointerException: No BaseStepListener has been registered
at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:900)
at net.thucydides.core.steps.StepEventBus.getBaseStepListener(StepEventBus.java:137)
at cucumber.runtime.SerenityObjectFactory.newInstance(SerenityObjectFactory.java:77)
at cucumber.runtime.SerenityObjectFactory.cacheNewInstance(SerenityObjectFactory.java:58)
at cucumber.runtime.SerenityObjectFactory.getInstance(SerenityObjectFactory.java:48)
at io.cucumber.java8.Java8Backend.buildWorld(Java8Backend.java:64)
at io.cucumber.core.runner.Runner.buildBackendWorlds(Runner.java:99)
at io.cucumber.core.runner.Runner.runPickle(Runner.java:65)
at io.cucumber.core.runtime.Runtime.lambda$execute$5(Runtime.java:110)
at io.cucumber.core.runtime.CucumberExecutionContext.runTestCase(CucumberExecutionContext.java:117)
at io.cucumber.core.runtime.Runtime.lambda$execute$6(Runtime.java:110)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at io.cucumber.core.runtime.Runtime$SameThreadExecutorService.execute(Runtime.java:233)
at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118)
at io.cucumber.core.runtime.Runtime.lambda$run$2(Runtime.java:86)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
at java.base/java.util.stream.SliceOps$1$1.accept(SliceOps.java:199)
at java.base/java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1631)
at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:127)
at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:502)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:488)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
at io.cucumber.core.runtime.Runtime.run(Runtime.java:87)
... 2 more
Before raising I did searched in the existing issues; there are some issues raised for same error but none of them really helped. Along with this I am attaching a zip file; which is very much relevant to the project we are working on.
serenity.demo.zip
Looking for any help, thanks !
arrin69 commented
Appears like this is raised here serenity-bdd/serenity-cucumber6#4