PQ60692: JAVA.IO.STREAMCORRUPTED EXCEPTION WHEN A SERVLET ATTEMPTS TO UNSERIALIZE AN OBJECT PASSED FROM AN APPLET.

APAR status
Closed as program error.

Error description
When using the Domino HTTP server to communicate with WebSphere
server, the customer sees JAVA.IO.StreamCorruptedException on
some of the communications when using a J2EE application with
applets communicating with servlets using serialized java
objects.
>>
The java code in the applet does something like
URL url = new URL("/OurServlet");
URLConnection connection = url.openConnection();
connection.setUseCaches(false);
connection.setDoInput(true);
connection.setDoOutput(true);
connection.setRequestProperty("CONTENT-TYPE",
"application/x-java-serialized-object");
ObjectOutputStream os = new
ObjectOutputStream(connection.getOutputStream());
os.writeObject(OurSerializableObject);
os.flush();
os.close();
>>
The servlet service method does something like
InputStream is = request.getInputStream();
ObjectInputStream is = new ObjectInputStream(is);
Object o = is.readObject();
>>
The servlet does its processing, and then sends a
serialized object back to the applet...
ObjectOutputStream out = new
ObjectOutputStream(response.getOutputStream());
out.writeObject(result);
>>
Then the applet processes the output from the servlet
as InputStream in = connection.getInputStream();
ObjectInputStream result = new ObjectInputStream(in);
Object res = result.readObject();
(Note: all of the above code as "cut and pasted" from a variety
of java classes, to simplify what is happening; But, it may not
execute as written here.)
Environment:
WebSphere Advanced Server, Single Server Edition, version 4.0.2.
with Lotus Domino, version 5.08
Error Message:
When Lotus Domino, version 5.08 is used as the HTTP server,
it fails with a java exception:
java.io.StreamCorruptedException: Version Mismatch, Expected 5
and got 0 This indicates that the data stream is getting
corrupted, presumably, since the only difference in the
environment is Domino, in the Domino HTTP server or the
associated Websphere support DLL.
Local fix
Workaround:
Make sure that the length of the serialized object is greater
than 256 bytes and not a multiple of 256 bytes.
Problem summary
****************************************************************
* USERS AFFECTED: All 4.02 WebSphere Application Server users  *
*                 of Domino Webserver.                         *
****************************************************************
* PROBLEM DESCRIPTION: Post data gets corrupted causing        *
*                      servlets to fail with JAVA.IO           *
*                      exceptions.                             *
****************************************************************
* RECOMMENDATION:                                              *
****************************************************************
Post data gets corrupted causing servlets to fail with
JAVA.IO exceptions.
Problem conclusion
Post data was at times corrupted before being passed to
the appserver.  Changes were made so that the post data
no longer is corrupted.
Temporary fix
Testfix sent to customer 5/13/02.
Comments
APAR information
APAR number PQ60692
Reported component name WEBSPHERE AE NT
Reported component ID 5630A2201
Reported release 400
Status CLOSED PER
PE NoPE
HIPER NoHIPER
Submitted date 2002-05-01
Closed date 2002-05-21
Last modified date 2002-05-21

APAR is sysrouted FROM one or more of the following:

APAR is sysrouted TO one or more of the following:

Modules/Macros
PLUGIN          

Fix information
Fixed component name WEBSPHERE AE NT
Fixed component ID 5630A2201

Applicable component levels
R400 PSY    UP


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > General
Operating system(s):
Software version: 400
Software edition:
Reference #: PQ60692
IBM Group: Software Group
Modified date: May 21, 2002