[keycloak-user] NoSuchMethodError when storing the user into Keycloak's cache

Kruti Parmar kruti.parmar at oneadvanced.com
Wed Nov 1 05:39:56 EDT 2017


Hi,

I have created  a custom storage provider which will migrate user from legacy app to keycloak's local storage on demand.  That is achieved.

Now I want to modify this functionality and store the user in to keycloak's cache instead of keycloak's local storage.

For that I have used the following code :

@Override
public void onCache(RealmModel realm, CachedUserModel user, UserModel delegate) {
                String password = ((UserAdapter)delegate).getPassword();
                if (password != null) {
                                user.getCachedWith().put(PASSWORD_CACHE_KEY, password);
                }
}

But I am getting an error saying - "org.jboss.resteasy.spi.UnhandledException: java.lang.NoSuchMethodError: org.keycloak.models.cache.CachedUserModel.getCachedWith()Ljava/util/concurrent/ConcurrentMap;".

Can anyone please help me to resolve this?

PS : I am using keycloak 3.1.0 Final version.

Thanks & regards,
Kruti

***** Email confidentiality *****

This message is private and confidential. If you have received this message in error, please notify us and remove it from your system. The dissemination, copying or distribution of this message, or related files, by anyone other than the intended recipient is strictly prohibited.



Any views or opinions expressed are solely those of the author and do not necessarily represent those of Advanced Computer Software Group Limited.



***** Email monitoring *****

Advanced Computer Software Group Limited may monitor email traffic data and also the content of email for the purposes of security and staff training.



***** Email security *****

In keeping with good computing practice, the recipient of this email should ensure that it is virus-free. Advanced Computer Software Group Limited does not accept responsibility for any virus that may be transferred by way of this email.



Email may be susceptible to data corruption, interception and/or unauthorised amendment. Advanced Computer Software Group Limited does not accept liability for any such corruption, interception or amendment or any consequences thereof.



This email has been scanned for viruses by the Symantec Email Security.cloud service.



Advanced Computer Software Group Limited

Registered office: Ditton Park, Riding Court Road, Datchet, Berkshire, SL3 9LL, UK

Registered in England under number 5965280

________________________________

Please consider the environment: Think before you print!


This message has been scanned for malware by Websense. www.websense.com


More information about the keycloak-user mailing list