<div dir="ltr">great that was it !<div><br></div><div>thanks mate.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 25, 2014 at 3:42 PM, 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">Looks like you haven&#39;t included the RestEasy Jackson Provider. Try adding a dependency on org.jboss.resteasy:resteasy-jackson-provider<br>
<div><div class="h5"><br>
----- Original Message -----<br>
&gt; From: &quot;Alexander Chriztopher&quot; &lt;<a href="mailto:alexander.chriztopher@gmail.com">alexander.chriztopher@gmail.com</a>&gt;<br>
&gt; To: <a href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a><br>
&gt; Sent: Tuesday, 25 November, 2014 2:30:01 PM<br>
&gt; Subject: [keycloak-user] Unable to find a MessageBodyReader of content-type application/json and type<br>
&gt; AccessTokenResponse<br>
&gt;<br>
&gt; Hi All,<br>
&gt;<br>
&gt; Am trying to execute this call :<br>
&gt;<br>
&gt; Keycloak keycloak = Keycloak.getInstance(&quot; <a href="http://localhost:9080/auth" target="_blank">http://localhost:9080/auth</a> &quot;,<br>
&gt; &quot;master&quot;, &quot;admin&quot;, &quot;admin&quot;, &quot;security-admin-console&quot;);<br>
&gt;<br>
&gt; But am getting the following error :<br>
&gt;<br>
&gt; Exception in thread &quot;main&quot; javax.ws.rs.client.ResponseProcessingException:<br>
&gt; javax.ws.rs.ProcessingException: Unable to find a MessageBodyReader of<br>
&gt; content-type application/json and type class<br>
&gt; org.keycloak.representations.AccessTokenResponse<br>
&gt; at<br>
&gt; org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.extractResult(ClientInvocation.java:140)<br>
&gt; at<br>
&gt; org.jboss.resteasy.client.jaxrs.internal.proxy.extractors.BodyEntityExtractor.extractEntity(BodyEntityExtractor.java:58)<br>
&gt; at<br>
&gt; org.jboss.resteasy.client.jaxrs.internal.proxy.ClientInvoker.invoke(ClientInvoker.java:104)<br>
&gt; at<br>
&gt; org.jboss.resteasy.client.jaxrs.internal.proxy.ClientProxy.invoke(ClientProxy.java:62)<br>
&gt; at com.sun.proxy.$Proxy19.grantToken(Unknown Source)<br>
&gt; at<br>
&gt; org.keycloak.admin.client.token.TokenManager.grantToken(TokenManager.java:56)<br>
&gt; at<br>
&gt; org.keycloak.admin.client.token.TokenManager.getAccessToken(TokenManager.java:33)<br>
&gt; at<br>
&gt; org.keycloak.admin.client.token.TokenManager.getAccessTokenString(TokenManager.java:28)<br>
&gt; at org.keycloak.admin.client.Keycloak.&lt;init&gt;(Keycloak.java:28)<br>
&gt; at org.keycloak.admin.client.Keycloak.getInstance(Keycloak.java:32)<br>
&gt; at fr.klee.test.RestTest.main(RestTest.java:22)<br>
&gt; Caused by: javax.ws.rs.ProcessingException: Unable to find a<br>
&gt; MessageBodyReader of content-type application/json and type class<br>
&gt; org.keycloak.representations.AccessTokenResponse<br>
&gt; at<br>
&gt; org.jboss.resteasy.core.interception.ClientReaderInterceptorContext.throwReaderNotFound(ClientReaderInterceptorContext.java:39)<br>
&gt; at<br>
&gt; org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.getReader(AbstractReaderInterceptorContext.java:73)<br>
&gt; at<br>
&gt; org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.proceed(AbstractReaderInterceptorContext.java:50)<br>
&gt; at<br>
&gt; org.jboss.resteasy.plugins.interceptors.encoding.GZIPDecodingInterceptor.aroundReadFrom(GZIPDecodingInterceptor.java:59)<br>
&gt; at<br>
&gt; org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.proceed(AbstractReaderInterceptorContext.java:53)<br>
&gt; at<br>
&gt; org.jboss.resteasy.client.jaxrs.internal.ClientResponse.readFrom(ClientResponse.java:248)<br>
&gt; at<br>
&gt; org.jboss.resteasy.client.jaxrs.internal.ClientResponse.readEntity(ClientResponse.java:181)<br>
&gt; at<br>
&gt; org.jboss.resteasy.specimpl.BuiltResponse.readEntity(BuiltResponse.java:211)<br>
&gt; at<br>
&gt; org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.extractResult(ClientInvocation.java:104)<br>
&gt; ... 10 more<br>
&gt;<br>
&gt; What can cause this error ?<br>
&gt;<br>
&gt; Am running this in the admin-client example (the master one) application by<br>
&gt; the way in order to have the right dependencies etc.<br>
&gt;<br>
&gt; Thanks for any help.<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; keycloak-user mailing list<br>
&gt; <a href="mailto:keycloak-user@lists.jboss.org">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>
</blockquote></div><br></div>