Monday, January 11, 2016 Did not meet stated content length of OutputStream

We were getting this error: Did not meet stated content length of OutputStream:  you wrote 139 bytes and I was expecting  you to write exactly 153 bytes!!!

There are a number of posts suggesting that one needs to change encoding.... also the Oracle doc "ProtocolException is thrown if multibyte characters is specified for HttpServletResponse.sendError method (Doc ID 1902525.1)" suggests the same.
However in our case upgrading the JVM fixed the issue. Probably the communication was happening between 2 versions of JVM using a different serialization strategy, who knows....
Thanks to Andrea for the resolution.

No comments: