[keycloak-user] java.lang.NoClassDefFoundError in a customized Reset password authentication flow

GESLIN Fabrice fabrice.geslin-prestataire at laposte.fr
Tue Apr 2 08:34:25 EDT 2019


Hi,


We're trying to customize the reset password flow by providing a custom authenticator

ResetCredentialEmailSms to replace the ResetCredentialEmail provided by default in Keycloak


In our ResetCredentialEmailSms class, as in the original ResetCredentialEmail, we're importing and using the org.keycloak.authentication.actiontoken.resetcred.ResetCredentialsActionToken class .


We can build our authenticator successfully with no warning or error of any kind but at runtime we got the following issue :


^[[36mkeycloak    |^[[0m ^[[0m^[[31m12:06:43,542 ERROR [org.keycloak.services.error.KeycloakErrorHandler] (default task-1) Uncaught server error: java.lang.NoClassDefFoundError: org/keycloak/authentication/actiontoken/resetcred/ResetCredentialsActionToken
^[[36mkeycloak    |^[[0m        at moncompte.oidcprovider.authentication.authenticators.resetcred.ResetCredentialEmailSms.authenticate(ResetCredentialEmailSms.java:85)
^[[36mkeycloak    |^[[0m        at org.keycloak.authentication.DefaultAuthenticationFlow.processFlow(DefaultAuthenticationFlow.java:221)
^[[36mkeycloak    |^[[0m        at org.keycloak.authentication.DefaultAuthenticationFlow.processAction(DefaultAuthenticationFlow.java:117)
^[[36mkeycloak    |^[[0m        at org.keycloak.authentication.AuthenticationProcessor.authenticationAction(AuthenticationProcessor.java:873)
^[[36mkeycloak    |^[[0m        at org.keycloak.services.resources.LoginActionsService.processFlow(LoginActionsService.java:292)
^[[36mkeycloak    |^[[0m        at org.keycloak.services.resources.LoginActionsService.processResetCredentials(LoginActionsService.java:622)
^[[36mkeycloak    |^[[0m        at org.keycloak.services.resources.LoginActionsService.resetCredentials(LoginActionsService.java:414)
^[[36mkeycloak    |^[[0m        at org.keycloak.services.resources.LoginActionsService.resetCredentialsPOST(LoginActionsService.java:337)
^[[36mkeycloak    |^[[0m        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
^[[36mkeycloak    |^[[0m        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
^[[36mkeycloak    |^[[0m        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
^[[36mkeycloak    |^[[0m        at java.lang.reflect.Method.invoke(Method.java:498)
...

[[36mkeycloak    |^[[0m        at java.lang.Thread.run(Thread.java:748)
^[[36mkeycloak    |^[[0m Caused by: java.lang.ClassNotFoundException: org.keycloak.authentication.actiontoken.resetcred.ResetCredentialsActionToken from [Module "deployment.mon-compte-authentication-0.0.1.jar" from Service Module Loader]
^[[36mkeycloak    |^[[0m        at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:255)
^[[36mkeycloak    |^[[0m        at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)
^[[36mkeycloak    |^[[0m        at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
^[[36mkeycloak    |^[[0m        at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
^[[36mkeycloak    |^[[0m        ... 77 more

Any clue about what we did wrong ?


Fabrice Geslin


Groupe La Poste


Post-scriptum La Poste

Ce message est confidentiel. Sous reserve de tout accord conclu par ecrit entre vous et La Poste, son contenu ne represente en aucun cas un engagement de la part de La Poste. Toute publication, utilisation ou diffusion, meme partielle, doit etre autorisee prealablement. Si vous n'etes pas destinataire de ce message, merci d'en avertir immediatement l'expediteur.


More information about the keycloak-user mailing list