Issue with Cucumber

124 views
Skip to first unread message

Deepak Mishra

unread,
Mar 2, 2018, 2:42:09 AM3/2/18
to Cukes
I am getting below error while working with cucumber with Maven. Could you please let me know how to solve this problem.

Note : I have mentioned POM.xml  file entries below.. Please let me know if I have missed any dependency.


Exception in thread "main" java.lang.NoClassDefFoundError: gherkin/util/FixJava

at cucumber.runtime.RuntimeOptions.<clinit>(RuntimeOptions.java:29)

at cucumber.api.cli.Main.run(Main.java:31)

at cucumber.api.cli.Main.main(Main.java:18)

Caused by: java.lang.ClassNotFoundException: gherkin.util.FixJava

at java.net.URLClassLoader.findClass(URLClassLoader.java:381)

at java.lang.ClassLoader.loadClass(ClassLoader.java:424)

at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338)

at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

... 3 more


<dependency>


<groupId>org.seleniumhq.selenium</groupId>


<artifactId>selenium-java</artifactId>


<version>2.53.1</version>


</dependency>




<!-- https://mvnrepository.com/artifact/info.cukes/cucumber-junit -->


<dependency>


<groupId>info.cukes</groupId>


<artifactId>cucumber-junit</artifactId>


<version>1.2.2</version>


<scope>test</scope>


</dependency>




 


<dependency>


<groupId>info.cukes</groupId>


<artifactId>cucumber-java</artifactId>


<version>1.2.2</version>


</dependency>




<dependency>


<groupId>info.cukes</groupId>


<artifactId>cucumber-picocontainer</artifactId>


<version>1.2.2</version>


<scope>test</scope>


</dependency>




<dependency>


<groupId>junit</groupId>


<artifactId>junit</artifactId>


<version>4.12</version>


<scope>test</scope>


</dependency>

Thomas Sundberg

unread,
Mar 2, 2018, 4:30:51 AM3/2/18
to Cukes
On 22 February 2018 at 19:59, Deepak Mishra <deepak....@gmail.com> wrote:
> I am getting below error while working with cucumber with Maven. Could you
> please let me know how to solve this problem.
>
> Note : I have mentioned POM.xml file entries below.. Please let me know if
> I have missed any dependency.
>

It looks like you are missing a dependency. It also looks like you are
trying to use a version of Cucumber that is just over three years old.
There has been 9 versiobns released since 1.2.2 was released.

I would suggest that you start a new project, clone this project:
https://github.com/cucumber/cucumber-java-skeleton

Get it to work. Then add Selenium to the mix and see that it still works.

You want to use a modern Selenium as well, the one you are using is
also rather dated.

HTH
Thomas
> --
> Posting rules: http://cukes.info/posting-rules.html
> ---
> You received this message because you are subscribed to the Google Groups
> "Cukes" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cukes+un...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://www.thinkcode.se/blog
Twitter: @thomassundberg

Better software through faster feedback
Reply all
Reply to author
Forward
0 new messages