reportportal / agent-java-cucumber

Cucumber JVM version [1.0.0; 2.0.0) adapter
Apache License 2.0
26 stars 16 forks source link

java.lang.NoClassDefFoundError: gherkin/IGherkinDialectProvider #25

Closed lgoldstein closed 5 years ago

lgoldstein commented 5 years ago

This is a reopen of issue #32. Still occurs with Cucumber 4.1.1 and Gherkin 6.0.14 - despite having cleaned and m2 repository and re-fetching the relevant artifacts (as originally suggested in the issue)

IlyasPatel commented 5 years ago

This is happening to me as well. Here are the dependencies I am using:

dependencies {
    compile 'io.cucumber:gherkin:6.0.14'
    compile 'io.cucumber:cucumber-core:4.2.0'
    compile 'io.cucumber:cucumber-java:4.2.0'
    compile 'io.cucumber:cucumber-junit:4.2.0'

    testCompile 'junit:junit:4.12'
}
tests.CucumberJvmTest > initializationError FAILED
    java.lang.NoClassDefFoundError: gherkin/IGherkinDialectProvider

        Caused by:
        java.lang.ClassNotFoundException: gherkin.IGherkinDialectProvider
IlyasPatel commented 5 years ago

When I downgrade the gherkin dependency to the following, then everything compiles: compile 'io.cucumber:gherkin:5.1.0'

From version 6.0.0, then I get the error above.

Srinija25 commented 5 years ago

I am facing the same problem. I downgraded to Gherkin 5.1.0 . It did not work for me.

My Cucumber java version is 4.2

IlyasPatel commented 5 years ago

@Srinija25 https://github.com/IlyasPatel/cucumber-allure-gradle

Try this project our, it works for me. It is in gradle though. You can take out the allure dependencies if you don't use it.

lgoldstein commented 5 years ago

Still occurs even with version 4.2.2

filland commented 5 years ago

@lgoldstein @IlyasPatel @Srinija25

To avoid problems with versions mess there is a compatibility matrix - https://github.com/reportportal/agent-java-cucumber#compatibility-matrix-for-cucumber-agents

This table might help you to choose the right versions of all сucumber libs.

Imspaliwal commented 5 years ago

@filland I have used dependencies as per matrix you have provided but it is not working for me and I am getting same error.

image

filland commented 5 years ago

@Imspaliwal what version of cucumber java do you want to use ?