I had problems like this in a more conventional Server/Client (Applet)
scenario.

I am not entirely certain what causes the ObjectInputStream to think it
is at EOF and didn't really
have the time to find a 'workaround'. It was actually easier to create
an RMI setup for what I wanted to acheive. Sounds daunting, it isn't
really. Needed the Java plugin in the browser to make it work (not a
problem for me, these are limited distribution, read Intranet/Mobile
client, applets.

I initially wanted to do all my communication via a servlet using a
stateful server/client setup however http based communication is NOT at
all well suited for such scenarios. If you need your servlet to perform
other duties, eg statistics etc, then it can also use RMI, means RMI is
being used as a bridge. I found that I was able to do away with the
servlet altogether in the end.

Andy Bailey

-----Original Message-----
From: Noah Zigas [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 12, 2001 2:46 PM
To: '[EMAIL PROTECTED]'
Subject: servlet hang


Hi All,
I'm new to the this list, but I have searched endlessly on the following
problem.

First the machine config:
        Dell-installed RedHat Linux, kernel 2.2.14
        Apache 1.3.12 compiled from source
        Tomcat 3.2.3 compile from source
        Blackdown JDK 1.2.2-FCS

I have a webapp that utilizes applet-servlet communication.  I send
serialized
java objects back and forth, but the problem I have only occurrs when
sending
a serialized object -from- the applet -to- the servlet.

My servlet.log file shows StreamCorruptedException: EOFException.

After a varying number of the above exceptions, the machine completely
hangs.  It's not just that the servlet engine crashes, but the entire
machine.
It then requires a hard reboot.

I have tried trapping the StreamCorruptedException.
I have tried closing the Connection.InputStream.
I have tried reading the leftover bytes -from- the
Connection.InputStream
        after the StreamCorruptedException was thrown.

This is an important project for my company, and I'm at my wits end.

Any suggestions or advice would be greatly appreciated.

Noah
Senior Software Engineer
Paxar Systems Group

Reply via email to