Hi Marcos
2011/3/21 Marcos Díez Fernández <[email protected]>
> Hi Sergey,
>
> I don't use ServerWebApplicationException.getMessage() and still get that
> exception.
>
> Don't know what else I could try, so I think I'll go with the errorMessage
> unmarshalling, although it may not be the most 'proper/correct' way...
>
>
This is the code fragment from your earlier message:
InputStream is = new ByteArrayInputStream(e.
getMessage().getBytes("UTF-8"));
ErrorDetail errorDetail = (ErrorDetail) jsonProvider.readFrom(
(Class)ErrorDetail.class,
(Class)ErrorDetail.class,
new Annotation[]{},
MediaType.APPLICATION_JSON_TYPE,
metadataMap,
is);
I can also see that e.getMessage(), in case of
ServerWebApppicationException, internally reads from response.getEntity(),
you can check the source :-). Somewhere the stream is consumed, can you
double check where it might be happening ? I have the test on mainline where
ResponseReader is used to do the same...
thanks, Sergey
> Thanks a lot for your help
> BR,
> Marcos.
>