The method getCompressedWriter() in the ResponseImpl class creates a writer
based on GZIP output stream. But it calls its own getOutputStream() method to
wrap the steam. This changes the mode to BYTE and all the following calls to the
getWriter() method throw IllegealStateException.
It happens in the serveExposedBean() method when an exported bean is serialized
as JSON object and getWriter() method is used after getCompressedWriter().
I think the code of the getCompressedWriter() method should be changed to the
following (super.getOutputStream() should be called to avoid modifying the
return new OutputStreamWriter(new