Discussion:
[Cucumber] Issue with Cucumber
(too old to reply)
Deepak Mishra
2018-02-22 18:59:11 UTC
Permalink
Raw Message
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>
--
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+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Thomas Sundberg
2018-03-02 09:30:24 UTC
Permalink
Raw Message
Post by Deepak Mishra
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
Post by Deepak Mishra
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>
--
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
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
--
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+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...