users@jersey.java.net

Re: [Jersey] ClientHandlerException. . . message body reader not found.

From: Sam Pullara <sam_at_sampullara.com>
Date: Wed, 31 Dec 2008 19:42:05 -0800

Are the Providers getting registered properly? You might want to
refer to this blog entry of mine:

http://www.javarants.com/2008/12/27/using-jax-rs-with-protocol-buffers-for-high-performance-rest-apis/

Sam

On Dec 31, 2008, at 7:23 PM, Sudhakar Kumar wrote:

> I am just getting started with Jersey (1.0.2-SNAPSHOT) . . . Trying
> out a simpler version of the entity-provider example in the jersey
> repository. The difference in my case being - read directly from the
> contents of the Properties Java type instead of a String type as is
> the case with the example.
>
> The Resource class has one method:
> @GET
> public Properties getProperties(){
> return System.getProperties();
> }
>
> I have a PropertiesProvider that implements MessageBodyReader and
> MessageBodyWriter.
>
> The client:
> Client c = Client.create();
> WebResource resource = c.resource("http://localhost:8081/ObjectEx/properties
> ");
> Properties p = resource.get(Properties.class);
> ...
>
> The call gets through to the server but I get the
> ClientHandlerException on the client with no message body reader for
> the Properties type.
>
> What am I missing? Can I get some help please?
>
> Thanks
> -Sudhakar
>
> It’s the same Hotmail®. If by “same” you mean up to 70% faster. Get
> your account now.