<div dir="ltr">Hi All,<div><br></div><div>Am trying to execute this call :</div><div><br></div><div>Keycloak keycloak = Keycloak.getInstance(&quot;<a href="http://localhost:9080/auth">http://localhost:9080/auth</a>&quot;, &quot;master&quot;, &quot;admin&quot;, &quot;admin&quot;, &quot;security-admin-console&quot;);<br></div><div><br></div><div>But am getting the following error :</div><div><br></div><div><div>Exception in thread &quot;main&quot; javax.ws.rs.client.ResponseProcessingException: javax.ws.rs.ProcessingException: Unable to find a MessageBodyReader of content-type application/json and type class org.keycloak.representations.AccessTokenResponse</div><div><span class="" style="white-space:pre">        </span>at org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.extractResult(ClientInvocation.java:140)</div><div><span class="" style="white-space:pre">        </span>at org.jboss.resteasy.client.jaxrs.internal.proxy.extractors.BodyEntityExtractor.extractEntity(BodyEntityExtractor.java:58)</div><div><span class="" style="white-space:pre">        </span>at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientInvoker.invoke(ClientInvoker.java:104)</div><div><span class="" style="white-space:pre">        </span>at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientProxy.invoke(ClientProxy.java:62)</div><div><span class="" style="white-space:pre">        </span>at com.sun.proxy.$Proxy19.grantToken(Unknown Source)</div><div><span class="" style="white-space:pre">        </span>at org.keycloak.admin.client.token.TokenManager.grantToken(TokenManager.java:56)</div><div><span class="" style="white-space:pre">        </span>at org.keycloak.admin.client.token.TokenManager.getAccessToken(TokenManager.java:33)</div><div><span class="" style="white-space:pre">        </span>at org.keycloak.admin.client.token.TokenManager.getAccessTokenString(TokenManager.java:28)</div><div><span class="" style="white-space:pre">        </span>at org.keycloak.admin.client.Keycloak.&lt;init&gt;(Keycloak.java:28)</div><div><span class="" style="white-space:pre">        </span>at org.keycloak.admin.client.Keycloak.getInstance(Keycloak.java:32)</div><div><span class="" style="white-space:pre">        </span>at fr.klee.test.RestTest.main(RestTest.java:22)</div><div>Caused by: javax.ws.rs.ProcessingException: Unable to find a MessageBodyReader of content-type application/json and type class org.keycloak.representations.AccessTokenResponse</div><div><span class="" style="white-space:pre">        </span>at org.jboss.resteasy.core.interception.ClientReaderInterceptorContext.throwReaderNotFound(ClientReaderInterceptorContext.java:39)</div><div><span class="" style="white-space:pre">        </span>at org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.getReader(AbstractReaderInterceptorContext.java:73)</div><div><span class="" style="white-space:pre">        </span>at org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.proceed(AbstractReaderInterceptorContext.java:50)</div><div><span class="" style="white-space:pre">        </span>at org.jboss.resteasy.plugins.interceptors.encoding.GZIPDecodingInterceptor.aroundReadFrom(GZIPDecodingInterceptor.java:59)</div><div><span class="" style="white-space:pre">        </span>at org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.proceed(AbstractReaderInterceptorContext.java:53)</div><div><span class="" style="white-space:pre">        </span>at org.jboss.resteasy.client.jaxrs.internal.ClientResponse.readFrom(ClientResponse.java:248)</div><div><span class="" style="white-space:pre">        </span>at org.jboss.resteasy.client.jaxrs.internal.ClientResponse.readEntity(ClientResponse.java:181)</div><div><span class="" style="white-space:pre">        </span>at org.jboss.resteasy.specimpl.BuiltResponse.readEntity(BuiltResponse.java:211)</div><div><span class="" style="white-space:pre">        </span>at org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.extractResult(ClientInvocation.java:104)</div><div><span class="" style="white-space:pre">        </span>... 10 more</div></div><div><br></div><div>What can cause this error ?</div><div><br></div><div>Am running this in the admin-client example (the master one) application by the way in order to have the right dependencies etc.</div><div><br></div><div>Thanks for any help.</div></div>