Issue 11826
ClientHandlerException: No matching message body reader found when using the client alone
11826
Reporter: mdoering
Assignee: jcuadra
Type: Bug
Summary: ClientHandlerException: No matching message body reader found when using the client alone
Priority: Blocker
Resolution: Invalid
Status: Closed
Created: 2012-09-11 11:34:28.802
Updated: 2013-12-16 17:50:22.626
Resolved: 2012-09-11 14:42:28.04
Description: When using the registry client alone trying to read a single dataset or listing the first page, the deserialization fails using both staging or the live registry on b3g4
-----
SEVERE: A message body reader for Java class org.gbif.registry.api.model.Dataset, and Java type class org.gbif.registry.api.model.Dataset, and MIME media type application/json was not found
Sep 11, 2012 11:26:55 AM com.sun.jersey.api.client.ClientResponse getEntity
SEVERE: The registered message body readers compatible with the MIME media type are:
application/json ->
com.sun.jersey.json.impl.provider.entity.JSONJAXBElementProvider$App
com.sun.jersey.json.impl.provider.entity.JSONArrayProvider$App
com.sun.jersey.json.impl.provider.entity.JSONObjectProvider$App
com.sun.jersey.json.impl.provider.entity.JSONRootElementProvider$App
com.sun.jersey.json.impl.provider.entity.JSONListElementProvider$App
*/* ->
]]>
Attachment regtest.zip
Author: jcuadra@gbif.org
Created: 2012-09-11 14:24:47.838
Updated: 2012-09-11 14:24:47.838
I think the problem lies in how you create are creating the injector
Injector injector = Guice.createInjector(new AnonymousAuthModule(), new RegistryServiceWsClientModule(props));
should be
Injector injector = Guice.createInjector(new AnonymousAuthModule(), new RegistryWsClientModule(props, false, true));
(turn "false" to true if search client needed)