After upgrading from keycloak 16.1.0, then to 17.0.1, then to 21.0.2, the configure otp action has broken. If the configure otp action is set to required, any new user gets an error when trying to setup their otp. The error on the web page is “An internal server error has occurred”. The error in the keycloak logs is, “ERROR [org.keycloak.services.error.KeycloakErrorHandler] (executor-thread-334) Uncaught server error: java.lang.NoClassDefFoundError: Could not initialize class java.awt.image.BufferedImage.” I am not seeing any other issues with the Keycloak installation and i have verified that openjdk 11 (java-11-openjdk-18.104.22.168.7-1.el7_9.x86_64) is installed. The Keycloak installation is running on Centos 7. The Keycloak application is running as the local linux keycloak user.
I was unable to find a solution to this issue through searching online. Thanks.