Microsoft KB Archive/187904

= FIX: Cannot Deserialize from HTTP1.1 Server / Java Servlets =

Article ID: 187904

Article Last Modified on 12/1/2003

-

APPLIES TO


 * Microsoft Internet Explorer 2.0
 * Microsoft Internet Explorer 3.0
 * Microsoft Internet Explorer 3.01
 * Microsoft Internet Explorer 3.02
 * Microsoft Internet Explorer 4.0 128-Bit Edition
 * Microsoft Internet Explorer 4.01 128-Bit Edition
 * Microsoft Internet Explorer 5.0
 * Microsoft Internet Explorer 5.01
 * Microsoft Internet Explorer 5.5
 * Microsoft Internet Explorer 1.0
 * Microsoft Internet Explorer 2.0
 * Microsoft Internet Explorer 3.0
 * Microsoft Internet Explorer 3.01
 * Microsoft Internet Explorer 3.02
 * Microsoft Internet Explorer 4.0 128-Bit Edition
 * Microsoft Internet Explorer 4.01 128-Bit Edition
 * Microsoft Internet Explorer 5.0
 * Microsoft Internet Explorer 5.01
 * Microsoft Internet Explorer 5.5
 * Microsoft Internet Explorer 3.2
 * Microsoft Internet Explorer 4.0 128-Bit Edition
 * Microsoft Java Virtual Machine

-



This article was previously published under Q187904



SYMPTOMS
When reading a serialized object from a Java servlet that is running on an HTTP 1.1 Web server the following exception is seen:

java.io.StreamCorruptedException: InputStream does not contain a serialized object



CAUSE
Certain Web Servers, notably Apache and Lotus Go Domino are HTTP 1.1 aware meaning that they will respond to requests from HTTP 1.1 capable browsers with data in the HTTP 1.1 protocol format. When serialized objects are passed from a Java servlet running on the relevant server, those objects are passed in what is known as "chunked" format (similar to how MIME encodes embedded objects). A bug in the Microsoft products listed prevents our Virtual Machine for Java from being able to deserialize those objects properly.



RESOLUTION
Since the Web server communicates with the browser in a LCD fashion, the user may set the browser to not use HTTP 1.1 (from the IE4 View menu, select Internet Options and click the Advanced tab) by simply clearing the check box labeled "Use HTTP 1.1." This causes the server to not send data in the "chunked" format and the Virtual Machine for Java is able to interpret and deserialize objects sent from Java servlets running on the server properly.



STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug has been corrected in the Virtual Machine for Java distributed with Internet Explorer 4.01 Service Pack 1 and later.



MORE INFORMATION
Servlets are Java objects that run on Web Servers via a CGI-like mechanism.

