users@jersey.java.net

Re: [Jersey] ClientHandlerException: A message body writer for Java type, class com.sun.jersey.multipart.MultiPart, and MIME media type, application/octet-stream, was not found

From: Craig McClanahan <Craig.McClanahan_at_Sun.COM>
Date: Thu, 11 Dec 2008 20:31:20 -0800

Gili wrote:
> I don't remember what I changed in the past two days but all of a sudden I am
> getting this exception:
>
> ClientHandlerException: A message body writer for Java type, class
> com.sun.jersey.multipart.MultiPart, and MIME media type,
> application/octet-stream, was not found
>
> when invoking WebResource.post(ClientResponse.class, multipart). This should
> be working, right?
>
> Gili
>
Only if you provide a MessageBodyWriter that knows how to handle
"application/octet-stream" (I presume you must be setting this media
type on one of your body parts). None of the default ones do.

Craig