instipod / DuoUniversalKeycloakAuthenticator

Keycloak Authenticator for Duo's new Universal Prompt
GNU General Public License v3.0
50 stars 15 forks source link

WARNING: An illegal reflective access operation has occurred #4

Closed ddimick closed 2 years ago

ddimick commented 2 years ago

When using with 18.0.0, it works as expected, but the following is logged.

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by retrofit2.Platform (file:/opt/keycloak/lib/../providers/DuoUniversalAuthenticator-1.0.3.jar) to constructor java.lang.invoke.MethodHandles$Lookup(java.lang.Class,int)
WARNING: Please consider reporting this to the maintainers of retrofit2.Platform
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
instipod commented 2 years ago

I found this related issue with the same message from another project: https://github.com/square/retrofit/issues/3341

It appears this message is generated since the Keycloak build is still using Java 11. When Keycloak updates to use a Java > 14, the message should no longer appear.

As a workaround, to suppress the message in Java 11, you can add the following flag to the JVM options when starting Keycloak: --add-opens=java.base/java.lang.invoke=ALL-UNNAMED