users@jersey.java.net

ClientHandlerException. . . message body reader not found.

From: Sudhakar Kumar <ksudhakar_at_live.com>
Date: Wed, 31 Dec 2008 22:23:39 -0500

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.
http://windowslive.com/online/hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_broad1_122008