On Wed, Nov 13, 2013 at 11:58 PM, Vimal C <[email protected]> wrote:

> I am having a RESTful webservice which was created with Apache WINK
> framework(version 1.1.3) with a resource method which is annotated as
> @produces("image/jpeg"). From that method, I am building JAX-RS response
> with type='image/jpeg' and entity = byte[] (image), like below.
>
> ResponseBuilder.type("image/jpeg");
> ResponseBuilder.entity(image);// image is a byte[]
> ResponseBuilder.build();
>
> This way of implementation was working fine with java 1.6. Now I am trying
> to migrate the java from 1.6 to 1.7. The same code is creating the
> following
> error with java 1.7.
>
> "The system could not find a javax.ws.rs.ext.MessageBodyWriter or a
> DataSourceProvider class for the [B type and image/jpeg mediaType.  Ensure
> that a javax.ws.rs.ext.MessageBodyWriter exists in the JAX-RS application
> for the type and media type specified."
>
> Can you please let me know how to resolve this ?
>
>

I believe this has been fixed in [1], and you should update to latest Wink
release.


[1] https://issues.apache.org/jira/browse/WINK-363

-- 
Luciano Resende
http://people.apache.org/~lresende
http://twitter.com/lresende1975
http://lresende.blogspot.com/

Reply via email to