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

Marek Posolda mposolda at redhat.com
Tue Apr 2 10:56:08 EDT 2019


Hi,

I think this error is due the fact that file 
jboss-deployment-structure.xml is either missing or it is missing the 
references to needed jboss module with the class 
org/keycloak/authentication/actiontoken/resetcred/ResetCredentialsActionToken. 
Which I think is the module "org.keycloak.keycloak-services" .

For some more reference, see for example this quickstart 
https://github.com/keycloak/keycloak-quickstarts/tree/latest/action-token-authenticator 
and especially this file in it 
https://github.com/keycloak/keycloak-quickstarts/blob/latest/action-token-authenticator/src/main/webapp/WEB-INF/jboss-deployment-structure.xml 
.

Hope this helps,
Marek

On 02/04/2019 14:34, GESLIN Fabrice wrote:
> 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.
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user




More information about the keycloak-user mailing list