Incompatible class change error
See original GitHub issueSummary
Tried to run a test after upgrading from Cucumber 2.1.0 to 3.0.2
Expected Behavior
Test runs successfully
Current Behavior
The following exception is thrown:
Exception in thread "main" java.lang.IncompatibleClassChangeError: Found interface cucumber.api.TestCase, but class was expected
at org.jetbrains.plugins.cucumber.java.run.CucumberJvm2SMFormatter.handleTestCaseStarted(CucumberJvm2SMFormatter.java:80)
at org.jetbrains.plugins.cucumber.java.run.CucumberJvm2SMFormatter.access$000(CucumberJvm2SMFormatter.java:17)
at org.jetbrains.plugins.cucumber.java.run.CucumberJvm2SMFormatter$1.receive(CucumberJvm2SMFormatter.java:32)
at org.jetbrains.plugins.cucumber.java.run.CucumberJvm2SMFormatter$1.receive(CucumberJvm2SMFormatter.java:30)
at cucumber.runner.EventBus.send(EventBus.java:28)
at cucumber.runner.TestCase.run(TestCase.java:37)
at cucumber.runner.Runner.runPickle(Runner.java:44)
at cucumber.runtime.Runtime.runFeature(Runtime.java:120)
at cucumber.runtime.Runtime.run(Runtime.java:106)
at cucumber.api.cli.Main.run(Main.java:35)
at cucumber.api.cli.Main.main(Main.java:18)
Possible causes
Here are some of the versions of the dependencies for the project. Maybe related?
<spring.version>4.3.7.RELEASE</spring.version>
<cucumber.version>3.0.2</cucumber.version>
<junit.version>4.12</junit.version>
<selenium.version>3.7.1</selenium.version>
Environment
Mac OS X IntelliJIDEA
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
What causes java.lang.IncompatibleClassChangeError?
This means that you have made some incompatible binary changes to the library without recompiling the client code. Java Language Specification §13 details ......
Read more >IncompatibleClassChangeError (Java Platform SE 7 )
Thrown when an incompatible class change has occurred to some class definition. The definition of some class, on which the currently executing method ......
Read more >How to resolve Incompatible Class Change Error - Examples ...
IncompatibleClassChangeError is thrown when the programmer: ... Normally, the compiler would fail to compile the class when one of these occurs, ...
Read more >Java Exception Handling - IncompatibleClassChangeError
A look into the Java IncompatibleClassChangeError, with code samples showing how binary incompatibilities may be unintentionally created.
Read more >[Solved] java.lang.IncompatibleClassChangeError
This error is due to an incompatible version of cglib with additional jar files in your project, such as asm. Random exceptions. Solution....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is caused by IDEA’s CucumberJvm2SMFormatter. It being the formatter for Cucumber2, runs into a breaking change in Cucumber 3.
If you remove
--plugin org.jetbrains.plugins.cucumber.java.run.CucumberJvm2SMFormatter
from program arguments in the run configuration it will work again. You’ll have to do this until InteliJ fixes their plugin.@RajaRaviTeja But to give a hint: Note that you are using both Junit and TestNG dependencies, and the testng dependency is a different version.