cucumber / cucumber-eclipse

Eclipse plugin for Cucumber
MIT License
192 stars 149 forks source link

deprecated Main class warning while using Cucumber 6.1.1 #415

Closed nukul25 closed 2 years ago

nukul25 commented 4 years ago

I have installed Cucumber plugin in latest eclipse version and added dependencies for cucumber 6.1.1 via maven pom.xml

I have added all the necessary dependencies from the Github location :https://github.com/cucumber/cucumber-java-skeleton/blob/master/pom.xml

Now when I am trying to run my feature file which contains a scenario ,I am getting the warning as

Jun 23, 2020 7:03:00 PM cucumber.api.cli.Main run WARNING: You are using deprecated Main class. Please use io.cucumber.core.cli.Main

And as a result of this somehow execution is failing and my output is:

Jun 23, 2020 7:03:00 PM cucumber.api.cli.Main run WARNING: You are using deprecated Main class. Please use io.cucumber.core.cli.Main

Scenario: Add a menu item # src/test/java/linkedlearning/cucumbercourse/features/MenuManagement.feature:3

0 Scenarios 0 Steps 0m1.020s

Now in the cucumber-core-6.1.1.jar,I can see that it has

--cucumber.api.cli package which has Main class and I suppose the execution is referring to this instead of

--io.cucumber.core.cli package which has Main class

Console is not showing the usual suggestions of creating steps in step definition file and is blank.

Same I did by using Cucumber 5.6.0

Can you please help.

My pom.xml <?xml version="1.0" encoding="UTF-8"?>

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

4.0.0
<groupId>linkedlearning</groupId>
<artifactId>cucumbercourse</artifactId>
<version>0.0.1-SNAPSHOT</version>

<name>cucumbercourse</name>
<!-- FIXME change it to the project's website -->
<url>http://maven.apache.org</url>

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <java.version>1.8</java.version>
    <junit.version>4.13</junit.version>
    <cucumber.version>5.6.0</cucumber.version>
    <maven.compiler.version>3.8.1</maven.compiler.version>
    <maven.compiler.source>1.7</maven.compiler.source>
    <maven.compiler.target>1.7</maven.compiler.target>
</properties>

<dependencies>

    <dependency>
        <groupId>io.cucumber</groupId>
        <artifactId>cucumber-core</artifactId>
        <version>${cucumber.version}</version>
        <scope>test</scope>
    </dependency>

    <dependency>
        <groupId>io.cucumber</groupId>
        <artifactId>cucumber-java</artifactId>
        <version>${cucumber.version}</version>
        <scope>test</scope>
    </dependency>

    <dependency>
        <groupId>io.cucumber</groupId>
        <artifactId>cucumber-junit</artifactId>
        <version>${cucumber.version}</version>
        <scope>test</scope>
    </dependency>

    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>${junit.version}</version>
        <scope>test</scope>
    </dependency>

    <dependency>
        <groupId>io.cucumber</groupId>
        <artifactId>cucumber-java8</artifactId>
        <version>${cucumber.version}</version>
    </dependency>

    <dependency>
        <groupId>io.cucumber</groupId>
        <artifactId>cucumber-plugin</artifactId>
        <version>${cucumber.version}</version>
    </dependency>

    <dependency>
        <groupId>io.cucumber</groupId>
        <artifactId>cucumber-jvm</artifactId>
        <version>${cucumber.version}</version>
        <type>pom</type>
    </dependency>
</dependencies>

<build>
    <pluginManagement><!-- lock down plugins versions to avoid using Maven 
            defaults (may be moved to parent pom) -->
        <plugins>
            <!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
            <plugin>
                <artifactId>maven-clean-plugin</artifactId>
                <version>3.1.0</version>
            </plugin>
            <!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <version>3.0.2</version>
            </plugin>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.0</version>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.22.1</version>
            </plugin>
            <plugin>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.0.2</version>
            </plugin>
            <plugin>
                <artifactId>maven-install-plugin</artifactId>
                <version>2.5.2</version>
            </plugin>
            <plugin>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>2.8.2</version>
            </plugin>
            <!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
            <plugin>
                <artifactId>maven-site-plugin</artifactId>
                <version>3.7.1</version>
            </plugin>
            <plugin>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>3.0.0</version>
            </plugin>
        </plugins>
    </pluginManagement>
</build>

Thanks

aslakhellesoy commented 4 years ago

I don't quite understand what's going on here. Is this a warning that is only shown when executing from Eclipse?

Do you get the same warning if you run mvn test in a terminal?

mpkorstanje commented 4 years ago

The eclipse plugin launches Cucumber via the cli runner and is using the old main method.

https://github.com/cucumber/cucumber-eclipse/blob/606905b84cd31eeb588434b52cb29dd0740cb630/cucumber.eclipse.editor/src/main/java/cucumber/eclipse/launching/CucumberFeatureLaunchConstants.java#L9

nukul25 commented 4 years ago

The eclipse plugin launches Cucumber via the cli runner and is using the old main method.

https://github.com/cucumber/cucumber-eclipse/blob/606905b84cd31eeb588434b52cb29dd0740cb630/cucumber.eclipse.editor/src/main/java/cucumber/eclipse/launching/CucumberFeatureLaunchConstants.java#L9

If we uninstall Cucumber eclipse plugin then obviously we will not get the option of running Feature File only.

nukul25 commented 4 years ago

I don't quite understand what's going on here. Is this a warning that is only shown when executing from Eclipse?

Do you get the same warning if you run mvn test in a terminal?

Hello If i understood correctly,running the command mvn test from the command line(which is opened from the locaion of pom) will result in success sincewe have default test class called App.test which contains prin HELLO WORLD. My concern is when I am running feature file only ,i got the issue as mentioned above. Thanks

manishbarthwal2410 commented 4 years ago

I am also getting similar issue with 4.7.4 version

nukul25 commented 4 years ago

Hello Team

Any updates on the issue.?I tried with different version such as 5.6.0 and also faced the same issue. Can you please help

Davidj361 commented 3 years ago

When I run a feature file directly, I get the same warning in Eclipse 4.17.0 with the Cucumber plugin from the Eclipse Marketplace. I am using this dependency in Maven:

    <!-- https://mvnrepository.com/artifact/io.cucumber/cucumber-java -->
    <dependency>
        <groupId>io.cucumber</groupId>
        <artifactId>cucumber-java</artifactId>
        <version>6.8.1</version>
    </dependency>

Still getting warnings even for Cucumber versions: 4.4.0, 6.7.0, 5.7.0, and 5.6.0.

brianle19 commented 3 years ago

Any update? I have the same problem when upgraded project to cucumber 6.x

muthu2490 commented 3 years ago

Having the same issue Anyone found any solution for this?

CHANDUGOUD229 commented 3 years ago

Having the same issue Anyone found any solution for this pls update

Ilkhomdzhon commented 3 years ago

Jan 16, 2021 2:17:50 AM cucumber.api.cli.Main run WARNING: You are using deprecated Main class. Please use io.cucumber.core.cli.Main

VERSION OF CUCUMBER IS 6.9.0

SAME HERE , GETTING ERROR

timhunt commented 3 years ago

I think this is a duplicate of #370.

shraddhabhalsing commented 3 years ago

Any update on deprecated Main class warning while using Cucumber 6.0 onwards version

chetanSrajiv commented 3 years ago

it worked for me when i downgraded my testng dependency version from 7.4.0 to 7.1.0. try adding this dependency to your pom.xml

    <!-- https://mvnrepository.com/artifact/org.testng/testng -->
    <dependency>
        <groupId>org.testng</groupId>
        <artifactId>testng</artifactId>
        <version>7.1.0</version>
    </dependency>
laeubi commented 3 years ago

This is a duplicate of #370

hamzazeryouh commented 3 years ago

i am the same problem

anileapen commented 3 years ago

I have the sane problem using Eclipse . My pom.xml is below:

``

4.0.0 com.aspectproject CucumberAspectProject 0.0.1-SNAPSHOT io.cucumber cucumber-java 6.11.0 net.sourceforge.cobertura cobertura 2.1.1 test org.seleniumhq.selenium selenium-java 3.141.59 com.sun tools 1.8 system C:\Program Files\Java\jdk-11.0.11\lib\tools.jar io.cucumber cucumber-core 6.11.0 junit junit 4.13.2 test org.hamcrest hamcrest-core 2.2 test io.cucumber cucumber-html 0.2.7 io.cucumber cucumber-junit 6.11.0 net.masterthought cucumber-reporting 5.6.0 io.cucumber gherkin 3.2.0 io.cucumber cucumber-jvm-deps 1.0.6 provided io.cucumber cucumber-testng 6.11.0 org.junit.platform junit-platform-launcher 1.5.1 test

`` Could someone help please?

laeubi commented 3 years ago

This is not a problem but a warning, there will be no "fix" unless someone opens a PR for this to the v1.x branch.

We are currently developing a new version of the cucumber-plugin with improved support for more recent cucumber versions, if you like try out the following update-site (please uninstall the old plugin before): https://github.com/cucumber/cucumber-eclipse#follow-the-latest-snapshot

dineshvy commented 2 years ago

I am still facing this issue and not getting resolution for this. Can anyone please help me.

bharadwaj92-qa commented 2 years ago

I see this issue has been marked as closed, but no where I see the solution. @laeubi or @nukul25 could you please help me ? Please tell me the steps to resolve this issue.

reena112556 commented 2 years ago

Hi, I am facing the same issue.

Sep 14, 2022 12:20:02 PM cucumber.api.cli.Main run WARNING: You are using deprecated Main class. Please use io.cucumber.core.cli.Main Sep 14, 2022 12:20:03 PM io.cucumber.core.runtime.FeaturePathFeatureSupplier get WARNING: No features found at file:

If you have any solution here please share here

Thanks!

laeubi commented 2 years ago

Please see https://github.com/cucumber/cucumber-eclipse/issues/415#issuecomment-919766422

sabirmulla007 commented 1 year ago

Having the same issue Anyone found any solution for this?

yes. same issue of deprecated class but my browser is not opening.

sabirmulla007 commented 1 year ago

same issue of deprecated class but my browser is not opening.

ghost commented 1 year ago

Build Path-> check -> Junit is added or not and also check for related libraries -> if not then-> Add libraries -> Add Junit -> Apply and close.

try with this. (I have just created demo cucumber project after done with this steps my warning was gone.)

manojmore123 commented 1 year ago

I have installed Cucumber plugin in latest eclipse version and added dependencies for cucumber 6.1.1 via maven pom.xml

I have added all the necessary dependencies from the Github location :https://github.com/cucumber/cucumber-java-skeleton/blob/master/pom.xml

Now when I am trying to run my feature file which contains a scenario ,I am getting the warning as

Jun 23, 2020 7:03:00 PM cucumber.api.cli.Main run WARNING: You are using deprecated Main class. Please use io.cucumber.core.cli.Main

And as a result of this somehow execution is failing and my output is:

Jun 23, 2020 7:03:00 PM cucumber.api.cli.Main run WARNING: You are using deprecated Main class. Please use io.cucumber.core.cli.Main

Scenario: Add a menu item # src/test/java/linkedlearning/cucumbercourse/features/MenuManagement.feature:3

0 Scenarios 0 Steps 0m1.020s

Now in the cucumber-core-6.1.1.jar,I can see that it has

--cucumber.api.cli package which has Main class and I suppose the execution is referring to this instead of

--io.cucumber.core.cli package which has Main class

Console is not showing the usual suggestions of creating steps in step definition file and is blank.

Same I did by using Cucumber 5.6.0

Can you please help.

My pom.xml

4.0.0

<groupId>linkedlearning</groupId>
<artifactId>cucumbercourse</artifactId>
<version>0.0.1-SNAPSHOT</version>

<name>cucumbercourse</name>
<!-- FIXME change it to the project's website -->
<url>http://maven.apache.org</url>

<properties>
  <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  <java.version>1.8</java.version>
  <junit.version>4.13</junit.version>
  <cucumber.version>5.6.0</cucumber.version>
  <maven.compiler.version>3.8.1</maven.compiler.version>
    <maven.compiler.source>1.7</maven.compiler.source>
  <maven.compiler.target>1.7</maven.compiler.target>
</properties>

<dependencies>

  <dependency>
      <groupId>io.cucumber</groupId>
      <artifactId>cucumber-core</artifactId>
      <version>${cucumber.version}</version>
      <scope>test</scope>
  </dependency>

  <dependency>
      <groupId>io.cucumber</groupId>
      <artifactId>cucumber-java</artifactId>
      <version>${cucumber.version}</version>
      <scope>test</scope>
  </dependency>

  <dependency>
      <groupId>io.cucumber</groupId>
      <artifactId>cucumber-junit</artifactId>
      <version>${cucumber.version}</version>
      <scope>test</scope>
  </dependency>

  <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>${junit.version}</version>
      <scope>test</scope>
  </dependency>

  <dependency>
      <groupId>io.cucumber</groupId>
      <artifactId>cucumber-java8</artifactId>
      <version>${cucumber.version}</version>
  </dependency>

  <dependency>
      <groupId>io.cucumber</groupId>
      <artifactId>cucumber-plugin</artifactId>
      <version>${cucumber.version}</version>
  </dependency>

  <dependency>
      <groupId>io.cucumber</groupId>
      <artifactId>cucumber-jvm</artifactId>
      <version>${cucumber.version}</version>
      <type>pom</type>
  </dependency>
</dependencies>

<build>
  <pluginManagement><!-- lock down plugins versions to avoid using Maven 
          defaults (may be moved to parent pom) -->
      <plugins>
          <!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
          <plugin>
              <artifactId>maven-clean-plugin</artifactId>
              <version>3.1.0</version>
          </plugin>
          <!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
          <plugin>
              <artifactId>maven-resources-plugin</artifactId>
              <version>3.0.2</version>
          </plugin>
          <plugin>
              <artifactId>maven-compiler-plugin</artifactId>
              <version>3.8.0</version>
          </plugin>
          <plugin>
              <artifactId>maven-surefire-plugin</artifactId>
              <version>2.22.1</version>
          </plugin>
          <plugin>
              <artifactId>maven-jar-plugin</artifactId>
              <version>3.0.2</version>
          </plugin>
          <plugin>
              <artifactId>maven-install-plugin</artifactId>
              <version>2.5.2</version>
          </plugin>
          <plugin>
              <artifactId>maven-deploy-plugin</artifactId>
              <version>2.8.2</version>
          </plugin>
          <!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
          <plugin>
              <artifactId>maven-site-plugin</artifactId>
              <version>3.7.1</version>
          </plugin>
          <plugin>
              <artifactId>maven-project-info-reports-plugin</artifactId>
              <version>3.0.0</version>
          </plugin>
      </plugins>
  </pluginManagement>
</build>

Than

manojmore123 commented 1 year ago

Please recheck feature file, may be you syntactical mistake

AshokMarrapu commented 10 months ago

Hi I have the same issue. Can someone help me with latest stable dependencies that might work.

My console shows like this:

Nov 28, 2023 7:54:51 AM cucumber.api.cli.Main run WARNING: You are using deprecated Main class. Please use io.cucumber.core.cli.Main

0 Scenarios 0 Steps 0m0.057s

┌───────────────────────────────────────────────────────────────────────────────────┐ │ Share your Cucumber Report with your team at https://reports.cucumber.io │ │ Activate publishing with one of the following: │ │ │ │ src/test/resources/cucumber.properties: cucumber.publish.enabled=true │ │ src/test/resources/junit-platform.properties: cucumber.publish.enabled=true │ │ Environment variable: CUCUMBER_PUBLISH_ENABLED=true │ │ JUnit: @CucumberOptions(publish = true) │ │ │ │ More information at https://cucumber.io/docs/cucumber/environment-variables/ │ │ │ │ Disable this message with one of the following: │ │ │ │ src/test/resources/cucumber.properties: cucumber.publish.quiet=true │ │ src/test/resources/junit-platform.properties: cucumber.publish.quiet=true │

dineshvy commented 10 months ago

After I added all the jars with the specific versions as mentioned in the video, my issue got resolved. I did this 6 months back. You can also check.

Link- https://youtu.be/d56lRIAwQEI?si=dk_hOfsbHaYRClyT

On Tue, 28 Nov 2023, 07:59 AshokMarrapu, @.***> wrote:

Hi I have the same issue. Can someone help me with latest stable dependencies that might work.

My console shows like this:

Nov 28, 2023 7:54:51 AM cucumber.api.cli.Main run WARNING: You are using deprecated Main class. Please use io.cucumber.core.cli.Main

0 Scenarios 0 Steps 0m0.057s

┌───────────────────────────────────────────────────────────────────────────────────┐ │ Share your Cucumber Report with your team at https://reports.cucumber.io │ │ Activate publishing with one of the following: │ │ │ │ src/test/resources/cucumber.properties: cucumber.publish.enabled=true │ │ src/test/resources/junit-platform.properties: cucumber.publish.enabled=true │ │ Environment variable: CUCUMBER_PUBLISH_ENABLED=true │ │ JUnit: @CucumberOptions(publish = true) │ │ │ │ More information at https://cucumber.io/docs/cucumber/environment-variables/ │ │ │ │ Disable this message with one of the following: │ │ │ │ src/test/resources/cucumber.properties: cucumber.publish.quiet=true │ │ src/test/resources/junit-platform.properties: cucumber.publish.quiet=true │

— Reply to this email directly, view it on GitHub https://github.com/cucumber/cucumber-eclipse/issues/415#issuecomment-1828961942, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANZWAGWDROHY5WPB5U2MUNDYGVEBTAVCNFSM4OHFNL52U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOBSHA4TMMJZGQZA . You are receiving this because you commented.Message ID: @.***>

shahnawazm786 commented 8 months ago

I am getting following error with latest version of cucumber. my pom.xml file and error attached here under **

UTF-8 11 11 org.seleniumhq.selenium selenium-java 4.17.0 junit junit 4.13.2 io.cucumber cucumber-java 7.15.0 io.cucumber cucumber-junit 7.15.0 test io.cucumber cucumber-core 7.15.0 io.cucumber cucumber-picocontainer 7.15.0 io.cucumber cucumber-spring 7.15.0 io.cucumber gherkin 27.0.0 org.apache.maven.plugins maven-surefire-plugin 3.0.0-M5 ** io.cucumber.core.exception.CompositeCucumberException: There were 2 exceptions. The details are in the stacktrace below. at io.cucumber.core.runtime.RethrowingThrowableCollector.getThrowable(RethrowingThrowableCollector.java:57) at io.cucumber.core.runtime.CucumberExecutionContext.getThrowable(CucumberExecutionContext.java:109) at io.cucumber.core.runtime.CucumberExecutionContext.runFeatures(CucumberExecutionContext.java:155) at io.cucumber.junit.Cucumber$StartAndFinishTestRun.evaluate(Cucumber.java:226) at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306) at org.junit.runners.ParentRunner.run(ParentRunner.java:413) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:93) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:40) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:529) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:756) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:452) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210) Suppressed: java.util.ServiceConfigurationError: io.cucumber.core.backend.ObjectFactory: io.cucumber.spring.SpringFactory Unable to get public no-arg constructor at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:582) at java.base/java.util.ServiceLoader.getConstructor(ServiceLoader.java:673) at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1233) at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1265) at java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1300) at java.base/java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1385) at io.cucumber.core.runtime.ObjectFactoryServiceLoader.loadSingleObjectFactoryOrDefault(ObjectFactoryServiceLoader.java:72) at io.cucumber.core.runtime.ObjectFactoryServiceLoader.loadObjectFactory(ObjectFactoryServiceLoader.java:43) at java.base/java.lang.ThreadLocal$SuppliedThreadLocal.initialValue(ThreadLocal.java:305) at java.base/java.lang.ThreadLocal.setInitialValue(ThreadLocal.java:195) at java.base/java.lang.ThreadLocal.get(ThreadLocal.java:172) at io.cucumber.core.runtime.ThreadLocalObjectFactorySupplier.get(ThreadLocalObjectFactorySupplier.java:18) at io.cucumber.core.runtime.BackendServiceLoader.loadBackends(BackendServiceLoader.java:48) at io.cucumber.core.runtime.BackendServiceLoader.get(BackendServiceLoader.java:37) at io.cucumber.core.runtime.BackendServiceLoader.get(BackendServiceLoader.java:33) at io.cucumber.core.runtime.ThreadLocalRunnerSupplier.createRunner(ThreadLocalRunnerSupplier.java:46) at java.base/java.lang.ThreadLocal$SuppliedThreadLocal.initialValue(ThreadLocal.java:305) at java.base/java.lang.ThreadLocal.setInitialValue(ThreadLocal.java:195) at java.base/java.lang.ThreadLocal.get(ThreadLocal.java:172) at io.cucumber.core.runtime.ThreadLocalRunnerSupplier.get(ThreadLocalRunnerSupplier.java:40) at io.cucumber.core.runtime.RethrowingThrowableCollector.executeAndThrow(RethrowingThrowableCollector.java:35) at io.cucumber.core.runtime.CucumberExecutionContext.getRunner(CucumberExecutionContext.java:141) at io.cucumber.core.runtime.CucumberExecutionContext.runBeforeAllHooks(CucumberExecutionContext.java:93) at io.cucumber.core.runtime.CucumberExecutionContext.lambda$runFeatures$6(CucumberExecutionContext.java:147) at io.cucumber.core.runtime.CucumberExecutionContext.execute(CucumberExecutionContext.java:163) at io.cucumber.core.runtime.CucumberExecutionContext.runFeatures(CucumberExecutionContext.java:146) ... 9 more Caused by: java.lang.NoClassDefFoundError: org/springframework/beans/BeansException at java.base/java.lang.Class.getDeclaredConstructors0(Native Method) at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3137) at java.base/java.lang.Class.getConstructor0(Class.java:3342) at java.base/java.lang.Class.getConstructor(Class.java:2151) at java.base/java.util.ServiceLoader$1.run(ServiceLoader.java:660) at java.base/java.util.ServiceLoader$1.run(ServiceLoader.java:657) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/java.util.ServiceLoader.getConstructor(ServiceLoader.java:668) ... 33 more Caused by: java.lang.ClassNotFoundException: org.springframework.beans.BeansException at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) ... 41 more Suppressed: java.util.ServiceConfigurationError: io.cucumber.core.backend.ObjectFactory: io.cucumber.spring.SpringFactory Unable to get public no-arg constructor at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:582) at java.base/java.util.ServiceLoader.getConstructor(ServiceLoader.java:673) at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1233) at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1265) at java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1300) at java.base/java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1385) at io.cucumber.core.runtime.ObjectFactoryServiceLoader.loadSingleObjectFactoryOrDefault(ObjectFactoryServiceLoader.java:72) at io.cucumber.core.runtime.ObjectFactoryServiceLoader.loadObjectFactory(ObjectFactoryServiceLoader.java:43) at java.base/java.lang.ThreadLocal$SuppliedThreadLocal.initialValue(ThreadLocal.java:305) at java.base/java.lang.ThreadLocal.setInitialValue(ThreadLocal.java:195) at java.base/java.lang.ThreadLocal.get(ThreadLocal.java:172) at io.cucumber.core.runtime.ThreadLocalObjectFactorySupplier.get(ThreadLocalObjectFactorySupplier.java:18) at io.cucumber.core.runtime.BackendServiceLoader.loadBackends(BackendServiceLoader.java:48) at io.cucumber.core.runtime.BackendServiceLoader.get(BackendServiceLoader.java:37) at io.cucumber.core.runtime.BackendServiceLoader.get(BackendServiceLoader.java:33) at io.cucumber.core.runtime.ThreadLocalRunnerSupplier.createRunner(ThreadLocalRunnerSupplier.java:46) at java.base/java.lang.ThreadLocal$SuppliedThreadLocal.initialValue(ThreadLocal.java:305) at java.base/java.lang.ThreadLocal.setInitialValue(ThreadLocal.java:195) at java.base/java.lang.ThreadLocal.get(ThreadLocal.java:172) at io.cucumber.core.runtime.ThreadLocalRunnerSupplier.get(ThreadLocalRunnerSupplier.java:40) at io.cucumber.core.runtime.RethrowingThrowableCollector.executeAndThrow(RethrowingThrowableCollector.java:35) at io.cucumber.core.runtime.CucumberExecutionContext.getRunner(CucumberExecutionContext.java:141) at io.cucumber.core.runtime.CucumberExecutionContext.runAfterAllHooks(CucumberExecutionContext.java:98) at io.cucumber.core.runtime.CucumberExecutionContext.execute(CucumberExecutionContext.java:163) at io.cucumber.core.runtime.CucumberExecutionContext.runFeatures(CucumberExecutionContext.java:151) ... 9 more Caused by: java.lang.NoClassDefFoundError: org/springframework/beans/BeansException at java.base/java.lang.Class.getDeclaredConstructors0(Native Method) at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3137) at java.base/java.lang.Class.getConstructor0(Class.java:3342) at java.base/java.lang.Class.getConstructor(Class.java:2151) at java.base/java.util.ServiceLoader$1.run(ServiceLoader.java:660) at java.base/java.util.ServiceLoader$1.run(ServiceLoader.java:657) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/java.util.ServiceLoader.getConstructor(ServiceLoader.java:668) ... 32 more Caused by: java.lang.ClassNotFoundException: org.springframework.beans.BeansException at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) ... 40 more