[keycloak-user] Realm.toRepresentation results in com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException

Andreas Lau totheocean0402 at gmail.com
Fri Jan 4 06:49:16 EST 2019


Hey me again, since nobody seams to be able to help me, I thought, maybe
it's due to the fact I didn't explain well enough what I try to do?
So I try to clarify a bit more in deep what I like achieve.
I'm using the keycloak client API to update some parts of the realm. To do
this I followed the test
https://github.com/keycloak/keycloak/blob/master/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/admin/realm/RealmTest.java

There is a simple example "public void renameRealmTest()"  that retrieves a
realm, transforms it to its representation and finally renames and updates
it.  This describes the work flow I try to follow. But doing this I results
in the mentioned exception "UnrecognizedPropertyException" from jackson.

At this point I ask for help because I think the test will be executed
before shipping keycloak by the way I'm using the 4.5 version.

So can you please help me to find the error or give me some hints that help
me to understand why the exception appears?

Thanks

Am Do., 27. Dez. 2018, 12:40 hat Andreas Lau <totheocean0402 at gmail.com>
geschrieben:

> Sorry for bouncing this up again. But I'm a bit stuck Ed on the problem.
> Can anyone help me out? Is this the right list for this?
>
> Thanks
>
> Am Mi., 19. Dez. 2018, 18:04 hat Frank Franz <totheocean0402 at gmail.com>
> geschrieben:
>
>> Hello,
>> I'm using the java admin client to create a realm and some other setting.
>> In this process I like to update the realm (set authentication bindings for
>> registration flow and credential flow) therefore I from my actual knowledge
>> have to transfer the realm to the realm representation.
>>
>> Doing this calling realm.toRepresentation() results in the following
>> error:
>> javax.ws.rs.client.ResponseProcessingException: javax.ws.rs.
>> ProcessingException: com.fasterxml.jackson.databind.exc.
>> UnrecognizedPropertyException: Unrecognized field "
>> offlineSessionMaxLifespanEnabled" (class org.keycloak.representations.idm
>> .RealmRepresentation), not marked as ignorable (101 known properties: "
>> directGrantFlow", "otpPolicyDigits", "identityProviderMappers", "
>> revokeRefreshToken", "identityProviders", "userFederationMappers", "
>> rememberMe", "duplicateEmailsAllowed", "dockerAuthenticationFlow", "
>> otpSupportedApplications", "adminEventsDetailsEnabled", "registrationFlow",
>> "editUsernameAllowed", "clients", "users", "emailTheme", "realm", "
>> actionTokenGeneratedByAdminLifespan", "authenticatorConfig",
>> "components", "certificate", "updateProfileOnInitialSocialLogin", "
>> otpPolicyType", "accessCodeLifespanUserAction", "protocolMappers", "id",
>> "accountTheme", "maxDeltaTimeSeconds", "enabledEventTypes", "verifyEmail",
>> "applications", "waitIncrementSeconds", "eventsListeners", "
>> eventsExpiration", "defaultDefaultClientScopes", "
>> defaultOptionalClientScopes", "passwordPolicy", "clientTemplates", "
>> registrationAllowed", "userManagedAccessAllowed", "notBefore", "
>> otpPolicyAlgorithm", "actionTokenGeneratedByUserLifespan", "
>> permanentLockout", "socialProviders", "otpPolicyInitialCounter"
>> [truncated]])
>>
>> Can you pleas give me a hint how to resolve this?
>> Thanks in advance.
>> Andreas
>>
>


More information about the keycloak-user mailing list