serenity-bdd / serenity-cucumber-starter

A skeleton project for Serenity BDD and Cucumber JVM
Apache License 2.0
180 stars 286 forks source link

Does Serenity BDD support the latest Java 21 version? #146

Open baskarcsb opened 4 months ago

baskarcsb commented 4 months ago

if anyone tried, please provide the configuration steps

wakaleo commented 4 months ago

Yes it does, there is no special configuration, just the standard Maven or Gradle setup

baskarcsb commented 3 months ago

Hello Wakaleo, we are currently using the 2.0.91</serenity.version> with Java 1.8. However, due to organizational constraints, we would like to upgrade to a higher version of Java, specifically Java 21. Will this version of Serenity support Java 21, or do we need a different Serenity version?

Just for your information: I encountered the following error when using the 2.0.91 version with Java 21.

INFO: An exception was caught and reported. Message: java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @4c39f513 java.lang.IllegalStateException: Unable to load cache item at com.google.inject.internal.cglib.core.internal.$LoadingCache.createEntry(LoadingCache.java:79) at com.google.inject.internal.cglib.core.internal.$LoadingCache.get(LoadingCache.java:34) at com.google.inject.internal.cglib.core.$AbstractClassGenerator$ClassLoaderData.get(AbstractClassGenerator.java:116)