EOFException - please help

Hi all,

My RMI implementation works fine for awhile, then it stops working for the EOFException below. It is weird because it start behaving like this after a week of working perfectly. I have restarted the whole process; and the same thing happened after about a week,

java.rmi.UnmarshalException: Error unmarshaling return; nested exception is:

java.io.EOFException

at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:217)

at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:350)

at com.hitachigst.GCE3.NodeImpl_Stub.getNodesInfo(Unknown Source)

at com.hitachigst.GCE3.GnodeInfo.getNodesInfo(GnodeInfo.java:156)

at com.hitachigst.GCE3.GnodeInfo.getNodeInf4all(GnodeInfo.java:170)

at com.hitachigst.GCE3.GnodeInfo.main(GnodeInfo.java:201)

Caused by: java.io.EOFException

at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2435)

at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1245)

at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1603)

at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1271)

at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845)

at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769)

at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)

at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)

at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)

at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:215)

... 5 more

[1672 byte] By [happy2005a] at [2007-10-2 9:17:53]
# 1
I have got exactly the same problem. The exception occurs after about 4 hours of intesive RMI usage. Are there any suggestions to solve this problem?
petzea at 2007-7-16 23:24:59 > top of Java-index,Core,Core APIs...
# 2

I'm getting this exact error in my code now. Well:

java.io.EOFException

at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2435)

at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1245)

at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)

at sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:297)

at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:146)

...

The _Stub class is different obviously, but again it's one that returns an instance of a serializable class. There's nothing in it but Strings and a HashMap of String->another class which itself is serializalble and has nothing but Strings and primitives. No errors or warnings of any sort are being emitted on the EJB side or by the RMI registry.

It would appear to be related to a code change made recently, but no code changes have been made that should affect the transfer in question, however, reverting to the previous code eliminates the problem, so the general environment the code is running in is OK.

I can repeat this quickly at will, no waiting for hours or days. :-) On the test version of a site I'm working on it occurs whenever anyone tries to log in, so it's very easily and very consistently repeatable; if that's of any use to anyone who wants me to try stuff. :-)

rachel.greenhama at 2007-7-16 23:24:59 > top of Java-index,Core,Core APIs...
# 3
Two questions.1. What was the recent code change? Anything to do with the fields in a serializable object, or a readObject() or writeObject() method?2. Are you sure you are deploying the changed classes correctly to both client and server?
ejpa at 2007-7-16 23:24:59 > top of Java-index,Core,Core APIs...