<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:10px"><div id="yui_3_16_0_1_1414424874755_2628">Hi Alexander,</div><div dir="ltr" id="yui_3_16_0_1_1414424874755_2627"> 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.</div><div id="yui_3_16_0_1_1414424874755_2743" dir="ltr">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.</div><div id="yui_3_16_0_1_1414424874755_2742" dir="ltr">Similar problem is observed in multiple places where deserialization kicks in..<br></div><div id="yui_3_16_0_1_1414424874755_2732" dir="ltr"><br></div><div id="yui_3_16_0_1_1414424874755_2733" dir="ltr">Specifically it is because of this</div><div id="yui_3_16_0_1_1414424874755_2734" dir="ltr"><br></div><div id="yui_3_16_0_1_1414424874755_2737" dir="ltr"> @JsonProperty("<b id="yui_3_16_0_1_1414424874755_2760">access_token</b>")<br style="" class=""> protected String <b id="yui_3_16_0_1_1414424874755_2758">token</b>;<br style="" class=""></div><div id="yui_3_16_0_1_1414424874755_2744" dir="ltr"><br></div><div id="yui_3_16_0_1_1414424874755_2745" dir="ltr">Hi Bill,</div><div id="yui_3_16_0_1_1414424874755_2746" dir="ltr"> Do you have any other ideas besides updating POJOs member variable name matching the JSON property? Please advise.</div><div id="yui_3_16_0_1_1414424874755_2747" dir="ltr"><br></div><div id="yui_3_16_0_1_1414424874755_2757" dir="ltr">Thanks</div><div id="yui_3_16_0_1_1414424874755_2748" dir="ltr">Kamal<br></div><div id="yui_3_16_0_1_1414424874755_2756" dir="ltr"> <br></div><div id="yui_3_16_0_1_1414424874755_2624"><span></span></div><br> <div id="yui_3_16_0_1_1414424874755_2631" style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 10px;"> <div id="yui_3_16_0_1_1414424874755_2630" style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div id="yui_3_16_0_1_1414424874755_2629" dir="ltr"> <hr size="1"> <font id="yui_3_16_0_1_1414424874755_2632" face="Arial" size="2"> <b><span style="font-weight:bold;">From:</span></b> Alexander Chriztopher <alexander.chriztopher@gmail.com><br> <b><span style="font-weight: bold;">To:</span></b> "keycloak-user@lists.jboss.org" <keycloak-user@lists.jboss.org> <br> <b><span style="font-weight: bold;">Sent:</span></b> Monday, October 27, 2014 11:45 AM<br> <b id="yui_3_16_0_1_1414424874755_2715"><span id="yui_3_16_0_1_1414424874755_2714" style="font-weight: bold;">Subject:</span></b> [keycloak-user] Java API documentation<br> </font> </div> <div id="yui_3_16_0_1_1414424874755_2633" class="y_msg_container"><br><div id="yiv7532398168"><div id="yui_3_16_0_1_1414424874755_2635" dir="ltr"><div id="yui_3_16_0_1_1414424874755_2634">Hi All,</div><div id="yui_3_16_0_1_1414424874755_2636"> </div><div id="yui_3_16_0_1_1414424874755_2668">Am using Keycloak 1.0.2.Final and am getting this error when using the rest API :</div><div id="yui_3_16_0_1_1414424874755_2656"> </div><div id="yui_3_16_0_1_1414424874755_2638"><div id="yui_3_16_0_1_1414424874755_2672" align="LEFT"><font id="yui_3_16_0_1_1414424874755_2761">Caused by: </font><u id="yui_3_16_0_1_1414424874755_2671"><font id="yui_3_16_0_1_1414424874755_2670" color="#0066cc"><font id="yui_3_16_0_1_1414424874755_2669" color="#0066cc">com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException</font></font></u><font id="yui_3_16_0_1_1414424874755_2673">: Unrecognized field "access_token" (class org.keycloak.representations.AccessTokenResponse), not marked as ignorable (7 known properties: "tokenType", "notBeforePolicy", "token", "expiresIn", "sessionState", "refreshToken", "idToken"])</font></div><font id="yui_3_16_0_1_1414424874755_2675">
<div id="yui_3_16_0_1_1414424874755_2674" align="LEFT"> at [Source: org.apache.http.conn.EofSensorInputStream@11b8a95d; line: 1, column: 18] (through reference chain: org.keycloak.representations.AccessTokenResponse["access_token"])</div>
</font><div id="yui_3_16_0_1_1414424874755_2655" align="LEFT"><font id="yui_3_16_0_1_1414424874755_2676">        at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(</font><u><font color="#0066cc"><font color="#0066cc">UnrecognizedPropertyException.java:51</font></font></u><font>) [jackson-databind-2.3.2.jar:2.3.2]</font></div><font>
</font><div id="yui_3_16_0_1_1414424874755_2637" align="LEFT"><font id="yui_3_16_0_1_1414424874755_2654">        at com.fasterxml.jackson.databind.DeserializationContext.reportUnknownProperty(</font><u><font color="#0066cc"><font color="#0066cc">DeserializationContext.java:671</font></font></u><font>) [jackson-databind-2.3.2.jar:2.3.2]</font></div><font>
</font><div id="yui_3_16_0_1_1414424874755_2653" align="LEFT"><font id="yui_3_16_0_1_1414424874755_2652">        at com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(</font><u><font color="#0066cc"><font color="#0066cc">StdDeserializer.java:771</font></font></u><font>) [jackson-databind-2.3.2.jar:2.3.2]</font></div><font>
</font><div id="yui_3_16_0_1_1414424874755_2651" align="LEFT"><font id="yui_3_16_0_1_1414424874755_2650">        at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperty(</font><u><font color="#0066cc"><font color="#0066cc">BeanDeserializerBase.java:1297</font></font></u><font>) [jackson-databind-2.3.2.jar:2.3.2]</font></div><font>
</font><div id="yui_3_16_0_1_1414424874755_2640" align="LEFT"><font id="yui_3_16_0_1_1414424874755_2639">        at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownVanilla(</font><u><font color="#0066cc"><font color="#0066cc">BeanDeserializerBase.java:1275</font></font></u><font>) [jackson-databind-2.3.2.jar:2.3.2]</font></div><font>
</font><div id="yui_3_16_0_1_1414424874755_2642" align="LEFT"><font id="yui_3_16_0_1_1414424874755_2641">        at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(</font><u><font color="#0066cc"><font color="#0066cc">BeanDeserializer.java:247</font></font></u><font>) [jackson-databind-2.3.2.jar:2.3.2]</font></div><font>
</font><div align="LEFT"><font>        at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(</font><u><font color="#0066cc"><font color="#0066cc">BeanDeserializer.java:118</font></font></u><font>) [jackson-databind-2.3.2.jar:2.3.2]</font></div><font>
</font><div align="LEFT"><font>        at com.fasterxml.jackson.databind.ObjectReader._bind(</font><u><font color="#0066cc"><font color="#0066cc">ObjectReader.java:1233</font></font></u><font>) [jackson-databind-2.3.2.jar:2.3.2]</font></div><font>
</font><div id="yui_3_16_0_1_1414424874755_2644" align="LEFT"><font id="yui_3_16_0_1_1414424874755_2643">        at com.fasterxml.jackson.databind.ObjectReader.readValue(</font><u><font color="#0066cc"><font color="#0066cc">ObjectReader.java:677</font></font></u><font>) [jackson-databind-2.3.2.jar:2.3.2]</font></div><font>
</font><div id="yui_3_16_0_1_1414424874755_2648" align="LEFT"><font id="yui_3_16_0_1_1414424874755_2649">        at org.jboss.resteasy.plugins.providers.jackson.ResteasyJackson2Provider.readFrom(</font><u><font color="#0066cc"><font color="#0066cc">ResteasyJackson2Provider.java:120</font></font></u><font>) [resteasy-jackson2-provider-3.0.8.Final.jar:]</font></div><font>
</font><div align="LEFT"><font>        at org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.readFrom(</font><u><font color="#0066cc"><font color="#0066cc">AbstractReaderInterceptorContext.java:59</font></font></u><font>) [resteasy-jaxrs-3.0.8.Final.jar:]</font></div><font>
</font><div align="LEFT"><font>        at org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.proceed(</font><u><font color="#0066cc"><font color="#0066cc">AbstractReaderInterceptorContext.java:51</font></font></u><font>) [resteasy-jaxrs-3.0.8.Final.jar:]</font></div><font>
</font><div id="yui_3_16_0_1_1414424874755_2647" align="LEFT"><font>        at org.jboss.resteasy.security.doseta.DigitalVerificationInterceptor.aroundReadFrom(</font><u><font color="#0066cc"><font color="#0066cc">DigitalVerificationInterceptor.java:32</font></font></u><font>) [resteasy-crypto-3.0.8.Final.jar:]</font></div><font>
</font><div id="yui_3_16_0_1_1414424874755_2646" align="LEFT"><font id="yui_3_16_0_1_1414424874755_2645">        at org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.proceed(</font><u><font color="#0066cc"><font color="#0066cc">AbstractReaderInterceptorContext.java:53</font></font></u><font>) [resteasy-jaxrs-3.0.8.Final.jar:]</font></div><font>
</font><div align="LEFT"><font>        at org.jboss.resteasy.plugins.interceptors.encoding.GZIPDecodingInterceptor.aroundReadFrom(</font><u><font color="#0066cc"><font color="#0066cc">GZIPDecodingInterceptor.java:59</font></font></u><font>) [resteasy-jaxrs-3.0.8.Final.jar:]</font></div><font>
</font><div align="LEFT"><font>        at org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.proceed(</font><u><font color="#0066cc"><font color="#0066cc">AbstractReaderInterceptorContext.java:53</font></font></u><font>) [resteasy-jaxrs-3.0.8.Final.jar:]</font></div><font>
</font><div align="LEFT"><font>        at org.jboss.resteasy.client.jaxrs.internal.ClientResponse.readFrom(</font><u><font color="#0066cc"><font color="#0066cc">ClientResponse.java:248</font></font></u><font>) [resteasy-client-3.0.8.Final.jar:]</font></div><font>
<div>        ... 164 more</div></font></div><div><br></div><div>Was wondering where this comes from as am using the 1.0.2.Final admin api and have updated my Wildfly Server accordingly.</div></div></div><br>_______________________________________________<br>keycloak-user mailing list<br><a ymailto="mailto:keycloak-user@lists.jboss.org" href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br><br></div> </div> </div> </div></body></html>