This is an old thread, but in case someone happens by here, like I did, researching the same problem, I thought I'd share.
The basic problem is that you get the response's output stream inside the try block, and then again in the catch block of the JRException. So if you raise a JRException while running a report, the attempt to log the problem will result in the illegal state exception you're seeing. Rewrite your code to scope your ServletOutputStream servletOutputStream variable outside the try so it will be available inside the catch.