[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 10:02:27 EST 2014


great that was it !

thanks mate.

On Tue, Nov 25, 2014 at 3:42 PM, Stian Thorgersen <stian at redhat.com> wrote:

> Looks like you haven't included the RestEasy Jackson Provider. Try adding
> a dependency on org.jboss.resteasy:resteasy-jackson-provider
>
> ----- Original Message -----
> > From: "Alexander Chriztopher" <alexander.chriztopher at gmail.com>
> > To: keycloak-user at lists.jboss.org
> > Sent: Tuesday, 25 November, 2014 2:30:01 PM
> > Subject: [keycloak-user] Unable to find a MessageBodyReader of
> content-type application/json and type
> > AccessTokenResponse
> >
> > 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.
> >
> > _______________________________________________
> > keycloak-user mailing list
> > keycloak-user at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/keycloak-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20141125/8def2277/attachment.html 


More information about the keycloak-user mailing list