<div dir="ltr"><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Alexander Chriztopher</b> <span dir="ltr">&lt;<a href="mailto:alexander.chriztopher@gmail.com">alexander.chriztopher@gmail.com</a>&gt;</span><br>Date: Mon, Nov 3, 2014 at 9:44 AM<br>Subject: Re: [keycloak-user] Java API documentation<br>To: Stian Thorgersen &lt;<a href="mailto:stian@redhat.com">stian@redhat.com</a>&gt;<br><br><br><div dir="ltr">Hi Stian,<div><br></div><div>I have opened an issue here : <a href="https://issues.jboss.org/browse/KEYCLOAK-811" target="_blank">https://issues.jboss.org/browse/KEYCLOAK-811</a></div><div><br></div><div>Thanks for your help.</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 3, 2014 at 9:30 AM, Stian Thorgersen <span dir="ltr">&lt;<a href="mailto:stian@redhat.com" target="_blank">stian@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span><br>
<br>
----- Original Message -----<br>
&gt; From: &quot;Alexander Chriztopher&quot; &lt;<a href="mailto:alexander.chriztopher@gmail.com" target="_blank">alexander.chriztopher@gmail.com</a>&gt;<br>
&gt; To: &quot;Kamal Jagadevan&quot; &lt;<a href="mailto:j.kamal@ymail.com" target="_blank">j.kamal@ymail.com</a>&gt;<br>
&gt; Cc: <a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a><br>
</span><span>&gt; Sent: Friday, 31 October, 2014 4:59:24 PM<br>
&gt; Subject: Re: [keycloak-user] Java API documentation<br>
&gt;<br>
</span><span>&gt; I have upgraded to 1.0.4.Final but still have the issue.<br>
&gt;<br>
&gt; I would consider this as a bug in Keycloak -well in the client at least- as<br>
&gt; am using Wildfly and i am embedding the Jackson dependencies with my war<br>
&gt; anyway. These dependencies are pulled by the Keycloak ones.<br>
&gt;<br>
&gt; @Keycloak team : should i open an issue for this one ?<br>
<br>
</span>Sure<br>
<span><br>
&gt;<br>
&gt; On Wed, Oct 29, 2014 at 8:16 PM, Kamal Jagadevan &lt; <a href="mailto:j.kamal@ymail.com" target="_blank">j.kamal@ymail.com</a> &gt; wrote:<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Hi Alexander,<br>
&gt; On a second look, my problem was with my tomcat application that integrates<br>
&gt; with Keycloak. This tomcat application was using fasterxml jackson parser<br>
&gt; whereas keycloak implementation uses codehaus jackson which gets overridden<br>
&gt; during runtime. I was able to overcome this problem by creating<br>
&gt; PropertyNamingStrategy and set it to ObjectMapper before deserializing the<br>
&gt; JSON.<br>
&gt;<br>
&gt; Alternatively Keycloak implementation can be modified to use fasterxml<br>
&gt; jackson databinding.<br>
&gt;<br>
&gt; -Kamal<br>
&gt;<br>
&gt;<br>
</span><div><div>&gt; From: Alexander Chriztopher &lt; <a href="mailto:alexander.chriztopher@gmail.com" target="_blank">alexander.chriztopher@gmail.com</a> &gt;<br>
&gt; To: Kamal Jagadevan &lt; <a href="mailto:j.kamal@ymail.com" target="_blank">j.kamal@ymail.com</a> &gt;<br>
&gt; Cc: &quot; <a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a> &quot; &lt; <a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a> &gt;<br>
&gt; Sent: Monday, October 27, 2014 12:54 PM<br>
&gt; Subject: Re: [keycloak-user] Java API documentation<br>
&gt;<br>
&gt; Hi Kamal and thanks.<br>
&gt;<br>
&gt; Am using the keycloak admin client which brings the following Jackson<br>
&gt; dependency : jackson-core-asl:1.9.9 and can not override this. I also don&#39;t<br>
&gt; have the option to change the property mapping as it comes with the Keycloak<br>
&gt; distribution am using :-(<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; On Mon, Oct 27, 2014 at 4:54 PM, Kamal Jagadevan &lt; <a href="mailto:j.kamal@ymail.com" target="_blank">j.kamal@ymail.com</a> &gt; wrote:<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Hi Alexander,<br>
&gt; I had faced the same problem few days back it is because of the mismatch<br>
&gt; between JSONProperty and POJO variable name(getter method) that too with<br>
&gt; fasterxml jackson parser.<br>
&gt; If you use codehaus jackson parser you wouldnt get any problem. One work<br>
&gt; around to this problem is to update the POJO variable name to reflect the<br>
&gt; JSONProperty name.<br>
&gt; Similar problem is observed in multiple places where deserialization kicks<br>
&gt; in..<br>
&gt;<br>
&gt; Specifically it is because of this<br>
&gt;<br>
&gt; @JsonProperty(&quot; access_token &quot;)<br>
&gt; protected String token ;<br>
&gt;<br>
&gt; Hi Bill,<br>
&gt; Do you have any other ideas besides updating POJOs member variable name<br>
&gt; matching the JSON property? Please advise.<br>
&gt;<br>
&gt; Thanks<br>
&gt; Kamal<br>
&gt;<br>
&gt;<br>
&gt;<br>
</div></div><div><div>&gt; From: Alexander Chriztopher &lt; <a href="mailto:alexander.chriztopher@gmail.com" target="_blank">alexander.chriztopher@gmail.com</a> &gt;<br>
&gt; To: &quot; <a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a> &quot; &lt; <a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a> &gt;<br>
&gt; Sent: Monday, October 27, 2014 11:45 AM<br>
&gt; Subject: [keycloak-user] Java API documentation<br>
&gt;<br>
&gt; Hi All,<br>
&gt; Am using Keycloak 1.0.2.Final and am getting this error when using the rest<br>
&gt; API :<br>
&gt; Caused by: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException :<br>
&gt; Unrecognized field &quot;access_token&quot; (class<br>
&gt; org.keycloak.representations.AccessTokenResponse), not marked as ignorable<br>
&gt; (7 known properties: &quot;tokenType&quot;, &quot;notBeforePolicy&quot;, &quot;token&quot;, &quot;expiresIn&quot;,<br>
&gt; &quot;sessionState&quot;, &quot;refreshToken&quot;, &quot;idToken&quot;])<br>
&gt; at [Source: org.apache.http.conn.EofSensorInputStream@11b8a95d; line: 1,<br>
&gt; column: 18] (through reference chain:<br>
&gt; org.keycloak.representations.AccessTokenResponse[&quot;access_token&quot;])<br>
&gt; at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(<br>
&gt; UnrecognizedPropertyException.java:51 ) [jackson-databind-2.3.2.jar:2.3.2]<br>
&gt; at<br>
&gt; com.fasterxml.jackson.databind.DeserializationContext.reportUnknownProperty(<br>
&gt; DeserializationContext.java:671 ) [jackson-databind-2.3.2.jar:2.3.2]<br>
&gt; at<br>
&gt; com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(<br>
&gt; StdDeserializer.java:771 ) [jackson-databind-2.3.2.jar:2.3.2]<br>
&gt; at<br>
&gt; com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperty(<br>
&gt; BeanDeserializerBase.java:1297 ) [jackson-databind-2.3.2.jar:2.3.2]<br>
&gt; at<br>
&gt; com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownVanilla(<br>
&gt; BeanDeserializerBase.java:1275 ) [jackson-databind-2.3.2.jar:2.3.2]<br>
&gt; at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(<br>
&gt; BeanDeserializer.java:247 ) [jackson-databind-2.3.2.jar:2.3.2]<br>
&gt; at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(<br>
&gt; BeanDeserializer.java:118 ) [jackson-databind-2.3.2.jar:2.3.2]<br>
&gt; at com.fasterxml.jackson.databind.ObjectReader._bind( ObjectReader.java:1233<br>
&gt; ) [jackson-databind-2.3.2.jar:2.3.2]<br>
&gt; at com.fasterxml.jackson.databind.ObjectReader.readValue(<br>
&gt; ObjectReader.java:677 ) [jackson-databind-2.3.2.jar:2.3.2]<br>
&gt; at<br>
&gt; org.jboss.resteasy.plugins.providers.jackson.ResteasyJackson2Provider.readFrom(<br>
&gt; ResteasyJackson2Provider.java:120 )<br>
&gt; [resteasy-jackson2-provider-3.0.8.Final.jar:]<br>
&gt; at<br>
&gt; org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.readFrom(<br>
&gt; AbstractReaderInterceptorContext.java:59 ) [resteasy-jaxrs-3.0.8.Final.jar:]<br>
&gt; at<br>
&gt; org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.proceed(<br>
&gt; AbstractReaderInterceptorContext.java:51 ) [resteasy-jaxrs-3.0.8.Final.jar:]<br>
&gt; at<br>
&gt; org.jboss.resteasy.security.doseta.DigitalVerificationInterceptor.aroundReadFrom(<br>
&gt; DigitalVerificationInterceptor.java:32 ) [resteasy-crypto-3.0.8.Final.jar:]<br>
&gt; at<br>
&gt; org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.proceed(<br>
&gt; AbstractReaderInterceptorContext.java:53 ) [resteasy-jaxrs-3.0.8.Final.jar:]<br>
&gt; at<br>
&gt; org.jboss.resteasy.plugins.interceptors.encoding.GZIPDecodingInterceptor.aroundReadFrom(<br>
&gt; GZIPDecodingInterceptor.java:59 ) [resteasy-jaxrs-3.0.8.Final.jar:]<br>
&gt; at<br>
&gt; org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.proceed(<br>
&gt; AbstractReaderInterceptorContext.java:53 ) [resteasy-jaxrs-3.0.8.Final.jar:]<br>
&gt; at org.jboss.resteasy.client.jaxrs.internal.ClientResponse.readFrom(<br>
</div></div>&gt; ClientResponse.java:248 ) [resteasy-client-3.0.8.Final.jar:]<br>
<div><div>&gt; ... 164 more<br>
&gt;<br>
&gt; Was wondering where this comes from as am using the 1.0.2.Final admin api and<br>
&gt; have updated my Wildfly Server accordingly.<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; keycloak-user mailing list<br>
&gt; <a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; keycloak-user mailing list<br>
&gt; <a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br>
</div></div></blockquote></div><br></div>
</div></div></div><br></div>