I have tried to test it under OpenJDK 14 ea 34 with error: Could not initialize class org.codehaus.groovy.vmplugin.v7.Java7
Update the groovy dependency? Maybe: https://issues.apache.org/jira/browse/GROOVY-8843
I have got this call stack:
麓麓麓
java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.vmplugin.v7.Java7
at org.codehaus.groovy.vmplugin.VMPluginFactory.
at org.codehaus.groovy.reflection.GroovyClassValueFactory.
at org.codehaus.groovy.reflection.ClassInfo.
at org.codehaus.groovy.reflection.ReflectionCache.getCachedClass(ReflectionCache.java:95)
at org.codehaus.groovy.reflection.ReflectionCache.
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.registerMethods(MetaClassRegistryImpl.java:210)
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.
at groovy.lang.GroovySystem.
at org.codehaus.groovy.runtime.InvokerHelper.
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.createMap(ScriptBytecodeAdapter.java:635)
at io.restassured.internal.ResponseParserRegistrar.
at io.restassured.RestAssured.
....
麓麓麓
FYI for the curious reader - I just upgraded to rest-assured version 4.3.0 and I no longer see these failures with Java 14 GA.
@johny2000uwb perhaps worth another try with the latest version:
https://github.com/rest-assured/rest-assured/releases/tag/rest-assured-4.3.0
same here. used 4.1.2 before and had the same NoClassDefFoundError. After upgrading to 4.3.0 the failre didn't occur anymore.
Yes it's always a good idea to upgrade :)
REST Assured has automatic builds on Java 14, see https://github.com/rest-assured/rest-assured/blob/master/.travis.yml.
I'm having the same issue and I see that my project use io.rest-assured:rest-assured:4.3.0 however, maven seem to see that 4.3.0 depends on org.codehaus.groovy:groovy:2.5.9 instead of groovy 3.0.2.
After investigation, there is a conflict in my project when resolving groovy.version. For me the conflict was with spring-boot-dependencies which was setting groovy.version to 2.5.9.
Most helpful comment
I'm having the same issue and I see that my project use
io.rest-assured:rest-assured:4.3.0however, maven seem to see that 4.3.0 depends onorg.codehaus.groovy:groovy:2.5.9instead of groovy 3.0.2.After investigation, there is a conflict in my project when resolving groovy.version. For me the conflict was with spring-boot-dependencies which was setting groovy.version to 2.5.9.