Hi Alexander,I had faced the same problem few days back it is because of the mismatch between JSONProperty and POJO variable name(getter method) that too with fasterxml jackson parser.If you use codehaus jackson parser you wouldnt get any problem. One work around to this problem is to update the POJO variable name to reflect the JSONProperty name.Similar problem is observed in multiple places where deserialization kicks in..Specifically it is because of this@JsonProperty("access_token")
protected String token;Hi Bill,Do you have any other ideas besides updating POJOs member variable name matching the JSON property? Please advise.ThanksKamal
From: Alexander Chriztopher <alexander.chriztopher@gmail.com>
To: "keycloak-user@lists.jboss.org" <keycloak-user@lists.jboss.org>
Sent: Monday, October 27, 2014 11:45 AM
Subject: [keycloak-user] Java API documentation
_______________________________________________Hi All,Am using Keycloak 1.0.2.Final and am getting this error when using the rest API :Caused by: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "access_token" (class org.keycloak.representations.AccessTokenResponse), not marked as ignorable (7 known properties: "tokenType", "notBeforePolicy", "token", "expiresIn", "sessionState", "refreshToken", "idToken"])at [Source: org.apache.http.conn.EofSensorInputStream@11b8a95d; line: 1, column: 18] (through reference chain: org.keycloak.representations.AccessTokenResponse["access_token"])at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:51) [jackson-databind-2.3.2.jar:2.3.2]at com.fasterxml.jackson.databind.DeserializationContext.reportUnknownProperty(DeserializationContext.java:671) [jackson-databind-2.3.2.jar:2.3.2]at com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:771) [jackson-databind-2.3.2.jar:2.3.2]at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperty(BeanDeserializerBase.java:1297) [jackson-databind-2.3.2.jar:2.3.2]at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownVanilla(BeanDeserializerBase.java:1275) [jackson-databind-2.3.2.jar:2.3.2]at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:247) [jackson-databind-2.3.2.jar:2.3.2]at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:118) [jackson-databind-2.3.2.jar:2.3.2]at com.fasterxml.jackson.databind.ObjectReader._bind(ObjectReader.java:1233) [jackson-databind-2.3.2.jar:2.3.2]at com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:677) [jackson-databind-2.3.2.jar:2.3.2]at org.jboss.resteasy.plugins.providers.jackson.ResteasyJackson2Provider.readFrom(ResteasyJackson2Provider.java:120) [resteasy-jackson2-provider-3.0.8.Final.jar:]at org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.readFrom(AbstractReaderInterceptorContext.java:59) [resteasy-jaxrs-3.0.8.Final.jar:]at org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.proceed(AbstractReaderInterceptorContext.java:51) [resteasy-jaxrs-3.0.8.Final.jar:]at org.jboss.resteasy.security.doseta.DigitalVerificationInterceptor.aroundReadFrom(DigitalVerificationInterceptor.java:32) [resteasy-crypto-3.0.8.Final.jar:]at org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.proceed(AbstractReaderInterceptorContext.java:53) [resteasy-jaxrs-3.0.8.Final.jar:]at org.jboss.resteasy.plugins.interceptors.encoding.GZIPDecodingInterceptor.aroundReadFrom(GZIPDecodingInterceptor.java:59) [resteasy-jaxrs-3.0.8.Final.jar:]at org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.proceed(AbstractReaderInterceptorContext.java:53) [resteasy-jaxrs-3.0.8.Final.jar:]at org.jboss.resteasy.client.jaxrs.internal.ClientResponse.readFrom(ClientResponse.java:248) [resteasy-client-3.0.8.Final.jar:]... 164 moreWas wondering where this comes from as am using the 1.0.2.Final admin api and have updated my Wildfly Server accordingly.
keycloak-user mailing list
keycloak-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/keycloak-user