Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deprecated Main class warning while using Cucumber 6.1.1 #415

Closed
nukul25 opened this issue Jun 24, 2020 · 30 comments
Closed

deprecated Main class warning while using Cucumber 6.1.1 #415

nukul25 opened this issue Jun 24, 2020 · 30 comments
Labels
🙏 help wanted Help wanted - not prioritized by core team v1.x

Comments

@nukul25
Copy link

nukul25 commented Jun 24, 2020

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>

Thanks

@mpkorstanje mpkorstanje pinned this issue Jun 24, 2020
@mpkorstanje mpkorstanje unpinned this issue Jun 24, 2020
@aslakhellesoy
Copy link
Contributor

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 mpkorstanje transferred this issue from cucumber/cucumber-java-skeleton Jun 24, 2020
@mpkorstanje
Copy link
Contributor

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

public static final String CUCUMBER_API_CLI_MAIN = "cucumber.api.cli.Main";

@nukul25
Copy link
Author

nukul25 commented Jun 25, 2020

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

public static final String CUCUMBER_API_CLI_MAIN = "cucumber.api.cli.Main";

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

@nukul25
Copy link
Author

nukul25 commented Jun 25, 2020

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
Copy link

I am also getting similar issue with 4.7.4 version

@nukul25
Copy link
Author

nukul25 commented Jun 30, 2020

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
Copy link

Davidj361 commented Oct 17, 2020

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
Copy link

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

@muthu2490
Copy link

Having the same issue Anyone found any solution for this?

@CHANDUGOUD229
Copy link

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

@Ilkhomdzhon
Copy link

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
Copy link

timhunt commented Mar 1, 2021

I think this is a duplicate of #370.

@shraddhabhalsing
Copy link

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

@chetanSrajiv
Copy link

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
Copy link
Contributor

laeubi commented Mar 28, 2021

This is a duplicate of #370

@laeubi laeubi closed this as completed Mar 28, 2021
@hamzazeryouh
Copy link

i am the same problem

@anileapen
Copy link

anileapen commented Sep 15, 2021

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
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-launcher</artifactId>
<version>1.5.1</version>
<scope>test</scope>

``
Could someone help please?

@laeubi
Copy link
Contributor

laeubi commented Sep 15, 2021

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

@laeubi laeubi added 🙏 help wanted Help wanted - not prioritized by core team v1.x labels Sep 15, 2021
@dineshvy
Copy link

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

@bharadwaj92-qa
Copy link

bharadwaj92-qa commented Aug 18, 2022

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
Copy link

reena112556 commented Sep 14, 2022

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
Copy link
Contributor

laeubi commented Sep 16, 2022

Please see #415 (comment)

@sabirmulla007
Copy link

Having the same issue Anyone found any solution for this?

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

@sabirmulla007
Copy link

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

@ghost
Copy link

ghost commented Feb 21, 2023

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
Copy link

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
Copy link

Please recheck feature file, may be you syntactical mistake

@AshokMarrapu
Copy link

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
Copy link

dineshvy commented Nov 28, 2023 via email

@shahnawazm786
Copy link

I am getting following error with latest version of cucumber.
my pom.xml file and error attached here under
**
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>

<dependencies>
	<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java -->
	<dependency>
		<groupId>org.seleniumhq.selenium</groupId>
		<artifactId>selenium-java</artifactId>
		<version>4.17.0</version>
	</dependency>

	<!-- https://mvnrepository.com/artifact/junit/junit -->
	<dependency>
		<groupId>junit</groupId>
		<artifactId>junit</artifactId>
		<version>4.13.2</version>
		<!--<scope>test</scope> -->
	</dependency>
	<!-- https://mvnrepository.com/artifact/io.cucumber/cucumber-java -->
	<dependency>
		<groupId>io.cucumber</groupId>
		<artifactId>cucumber-java</artifactId>
		<version>7.15.0</version>
	</dependency>
	<!-- https://mvnrepository.com/artifact/io.cucumber/cucumber-junit -->
	<dependency>
		<groupId>io.cucumber</groupId>
		<artifactId>cucumber-junit</artifactId>
		<version>7.15.0</version>
		<scope>test</scope>
	</dependency>
	<!-- https://mvnrepository.com/artifact/io.cucumber/cucumber-core -->
	<dependency>
		<groupId>io.cucumber</groupId>
		<artifactId>cucumber-core</artifactId>
		<version>7.15.0</version>
	</dependency>
	<!-- https://mvnrepository.com/artifact/io.cucumber/cucumber-picocontainer -->
	<dependency>
		<groupId>io.cucumber</groupId>
		<artifactId>cucumber-picocontainer</artifactId>
		<version>7.15.0</version>
	</dependency>
	<!-- https://mvnrepository.com/artifact/io.cucumber/cucumber-spring -->
	<dependency>
		<groupId>io.cucumber</groupId>
		<artifactId>cucumber-spring</artifactId>
		<version>7.15.0</version>
	</dependency>
	<!-- https://mvnrepository.com/artifact/io.cucumber/gherkin -->
	<dependency>
		<groupId>io.cucumber</groupId>
		<artifactId>gherkin</artifactId>
		<version>27.0.0</version>
	</dependency>


</dependencies>

<build>
	<plugins>
		<plugin>
			<groupId>org.apache.maven.plugins</groupId>
			<artifactId>maven-surefire-plugin</artifactId>
			<version>3.0.0-M5</version>
		</plugin>
	</plugins>
</build>**

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🙏 help wanted Help wanted - not prioritized by core team v1.x
Projects
None yet
Development

No branches or pull requests