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