OS - Oracle Linux Server 7.6
Gradle Installed - 5.0
groovy Installed - 3.0.0-SNAPSHOT
JVM - 11.0.1 (Azul Systems, Inc. 11.0.1+13-LTS)
I am running appRunWar but errors out with below warning and exception:
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass$3$1 (file:/home/basdev/.gradle/caches/modules-2/files-2.1/org.codehaus.groovy/groovy/2.3.10/b465f206f244ef4151cb424762343849e2bba64c/groovy-2.3.10.jar) to method java.lang.Object.finalize()
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass$3$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Exception in thread “main” java.lang.ClassCastException: class [B cannot be cast to class [C ([B and [C are in module java.base of loader ‘bootstrap’)
I had a look at https://bugs.openjdk.java.net/browse/JDK-8218540 and https://issues.apache.org/jira/browse/GROOVY-7716 and the error should not come with my installed groovy version.
I have groovy plugin applied and imported groovy.json.JsonSlurper in my build.gradle file.
In WARNING lines it shows gradle cache is picking groovy 2.3.10 which is older version.
I am not sure is this why appRunWar is errors out.
I even tried adding dependency as mentioned in https://mvnrepository.com/artifact/org.codehaus.groovy/groovy-json/3.0.0-alpha-4, but no luck.
Could someone help me on how the cache will pick latest groovy version.
Thanks in advance.