[keycloak-user] Unable to find a MessageBodyReader of content-type application/json and type AccessTokenResponse

Alexander Chriztopher alexander.chriztopher at gmail.com
Tue Nov 25 08:30:01 EST 2014


Hi All,

Am trying to execute this call :

Keycloak keycloak = Keycloak.getInstance("http://localhost:9080/auth",
"master", "admin", "admin", "security-admin-console");

But am getting the following error :

Exception in thread "main" 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
at
org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.extractResult(ClientInvocation.java:140)
at
org.jboss.resteasy.client.jaxrs.internal.proxy.extractors.BodyEntityExtractor.extractEntity(BodyEntityExtractor.java:58)
at
org.jboss.resteasy.client.jaxrs.internal.proxy.ClientInvoker.invoke(ClientInvoker.java:104)
at
org.jboss.resteasy.client.jaxrs.internal.proxy.ClientProxy.invoke(ClientProxy.java:62)
at com.sun.proxy.$Proxy19.grantToken(Unknown Source)
at
org.keycloak.admin.client.token.TokenManager.grantToken(TokenManager.java:56)
at
org.keycloak.admin.client.token.TokenManager.getAccessToken(TokenManager.java:33)
at
org.keycloak.admin.client.token.TokenManager.getAccessTokenString(TokenManager.java:28)
at org.keycloak.admin.client.Keycloak.<init>(Keycloak.java:28)
at org.keycloak.admin.client.Keycloak.getInstance(Keycloak.java:32)
at fr.klee.test.RestTest.main(RestTest.java:22)
Caused by: javax.ws.rs.ProcessingException: Unable to find a
MessageBodyReader of content-type application/json and type class
org.keycloak.representations.AccessTokenResponse
at
org.jboss.resteasy.core.interception.ClientReaderInterceptorContext.throwReaderNotFound(ClientReaderInterceptorContext.java:39)
at
org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.getReader(AbstractReaderInterceptorContext.java:73)
at
org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.proceed(AbstractReaderInterceptorContext.java:50)
at
org.jboss.resteasy.plugins.interceptors.encoding.GZIPDecodingInterceptor.aroundReadFrom(GZIPDecodingInterceptor.java:59)
at
org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.proceed(AbstractReaderInterceptorContext.java:53)
at
org.jboss.resteasy.client.jaxrs.internal.ClientResponse.readFrom(ClientResponse.java:248)
at
org.jboss.resteasy.client.jaxrs.internal.ClientResponse.readEntity(ClientResponse.java:181)
at
org.jboss.resteasy.specimpl.BuiltResponse.readEntity(BuiltResponse.java:211)
at
org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.extractResult(ClientInvocation.java:104)
... 10 more

What can cause this error ?

Am running this in the admin-client example (the master one) application by
the way in order to have the right dependencies etc.

Thanks for any help.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20141125/93dc0a8a/attachment-0001.html 


More information about the keycloak-user mailing list