Compiler version in Cucumber support

This setup for this seems quite straightforward.

Ubuntu 20.10
jdk 1.8.0_212
IntelliJ IDEA 2020.3 (Community Edition)
Build #IC-203.5981.155, built on November 30, 2020

trying to run a cucumber test using the cucumber kotlin community plugin, I get the following:

Exception in thread "main" java.lang.UnsupportedClassVersionError: org/jetbrains/plugins/cucumber/java/run/CucumberJvm4SMFormatter has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

Are there parts of the IDEA community edition that are no longer supported against jdk 8? This is quite a drastic breakage for those companies that have extensive integration tests written in kotlin and cucumber.

Could you share your build script? I don’t have a ubuntu machine so I can’t test this myself but maybe there is something in your gradle file that is not set up properly. Also that way we could see what version of kotlin you are using.

Ah, my oversight. I will see if I can cut down the build script, but this is actually a problem using either the idea compiler or the gradle build. This spent happen on the command line, as this would seem to be an issue with running cucumber in ide only.

The kotlin version is 1.4.21… And this issue only appeared with the update to community idea 2020.3. when I downloaded to 2020.2, things work again. A colleague of mine has encountered exactly the same issue running idea enterprise on windows as a result of the same version upgrade, so I am inclined to suspect that some piece of code was in fact built to jdk11 compat only.

Maybe check that the cucumber plugin is up to date. Otherwise you should probably create a ticket at https://kotl.in/issue. Not sure if this is a kotlin or intellij problem. In either case this is the right issue tracker.

It does seem to have been a consequence of running cucumber 4.7. upgrading to cucumber 6 seems to have fixed the problem.

1 Like