Reputation: 29
This Error is appears when i trying to run junit test on eclipse using cucumber
ava.lang.NoClassDefFoundError: cucumber/runtime/snippets/SummaryPrinter
at cucumber.api.junit.Cucumber.run(Cucumber.java:90)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: java.lang.ClassNotFoundException: cucumber.runtime.snippets.SummaryPrinter
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 7 more
Upvotes: 0
Views: 468
Reputation: 1
Update cucumber-core,cucumber-java and cucumber-junit to the same version ( i have used 1.1.5 version ).The issue is resolved for me.
Upvotes: 0
Reputation: 553
I got this error while upgrading the Cucumber version in my Maven based project.
Turn out that I updated <artifactId>cucumber-java</artifactId>
version from 1.1.5 to 1.2.4, but I didn't update <artifactId>cucumber-junit</artifactId>
- it was still on 1.1.5.
On the moment I updated both to the same version, this error was gone.
Upvotes: 1