Forum Discussion

ffisk162's avatar
New Member
3 years ago

java.lang.NoClassDefFoundError: io/cucumber/messages/Messages$Envelope

Hi, windows 10 based error. Just a beginner - trying to run a basic scenario what has no features defined. So expect cucumber to reply something like:


No features found at [.]
0 Scenarios
0 Steps


<This is my expectation based on the book "The Cucumber for Java Book">


But get the below instead.  Would like to get some advice on this - thanks!


java -cp "jars/*" io.cucumber.core.cli.Main -p pretty .

Exception in thread "main" java.lang.NoClassDefFoundError: io/cucumber/messages/Messages$Envelope
at io.cucumber.core.plugin.NoPublishFormatter.setEventPublisher(
at io.cucumber.core.plugin.Plugins.setEventBusOnEventListenerPlugins(
at io.cucumber.core.runtime.Runtime$
at io.cucumber.core.cli.Main.main(
Caused by: java.lang.ClassNotFoundException: io.cucumber.messages.Messages$Envelope
at Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 5 more


jars directory

10/09/2021 03:19 PM 728,472 cucumber-core-6.6.0.jar
10/09/2021 03:20 PM 678,775 cucumber-java-6.6.0.jar
09/18/2021 10:07 PM 596,141 cucumber-jvm-deps-1.0.6.jar
10/09/2021 03:23 PM 31,714 cucumber-plugin-6.6.0.jar
10/09/2021 03:00 PM 138,261 gherkin-18.1.1.jar
10/09/2021 03:24 PM 2,128,624 messages-17.1.0.jar
09/18/2021 10:31 PM 13,153 tag-expressions-4.0.2.jar


directory structure overall is:




with jars in the jars dir - nothing else. Thanks all.

No RepliesBe the first to reply