Bug description
When using JDK 11 when the groovy scripting is access this may be seen in the Web container logs
WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.codehaus.groovy.vmplugin.v7.Java7$1 (file:/tc85/webapps/openam/WEB-INF/lib/groovy-all-2.4.12.jar) to constructor java.lang.invoke.MethodHandles$Lookup(java.lang.Class,int) WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.vmplugin.v7.Java7$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
How to reproduce the issue
- Install AM6.5.x with JDK11
- Access say any thing involving Groovy script (eg: OIDC or Auth script)
- Check Tomcat catalina out
Expected behaviour
No warning like this for JDK11
Current behaviour
See WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.codehaus.groovy.vmplugin.v7.Java7$1 (file:/tc85/webapps/openam/WEB-INF/lib/groovy-all-2.4.12.jar) to constructor java.lang.invoke.MethodHandles$Lookup(java.lang.Class,int) WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.vmplugin.v7.Java7$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
Work around
Can be ignored as it is just a WARNING by groovy without functional impact
Code analysis
Groovy issues with JDK1
GROOVY-8339 Fix warning "An illegal reflective access operation has occurred"
GROOVY-8843 Fix illegal reflective access within o.c.g.vmplugin.v7.Java7
GROOVY-9103 CLONE - CLONE - Fix warning "An illegal reflective access operation has occurred"
When the above Groovy issues is resolved for JDK11, the Groovy library probably will need to be updated.