Serialization problem

I am writing a client/server application. The server is based on EJB architecture.
The JGoDocument and its content are created in the server side. When the document contains more then ~150 nodes, it does not pass through the rmi. It seems like it stacks in an endless loop in the serialization stage.
Does anyone have any idea?

Maybe the thread needs a bigger stack.

I tried the -Xmx in order to enlarge the heap size.
It didnt help. Is there any other way to enlarge the thread size?


Tried also the -Xss argument. Didnt help niether

Why do you believe that “it stacks in an endless loop in the serialization stage”? Did you break in the debugger to see the stack?
I didn’t know there were any argument size limits for either serialization or for RMI, but there might be some for RMI that I’m not aware of.

I get a stackOverflow error without any stacktrace

Are you able to serialize and deserialize your JGoDocument to a file? Something like:
FileOutputStream outf = new FileOutputStream(“doc.serialized”);
ObjectOutputStream ostream = new ObjectOutputStream(outf);
FileInputStream inf = new FileInputStream(“doc.serialized”);
ObjectInputStream istream = new ObjectInputStream(inf);
JGoDocument newdoc = (JGoDocument)istream.readObject();
(I haven’t tested this, though.)
Usually when there are serialization problems it’s due to some particular object not being serializable, and you get a reasonable error for that.

Sorry for the late response.
I did the serialization test you have suggested in the server side, a minute before I return the document to the client side.
The serialization and the deserialization ended well. The file created was of size 183k.
Yet, the client was stuck. It made the call to the server side through the ejb client object but was never returned.
The Windows Task Manager shows that most of the cpu (97%) is taken by my client application. Seams like an endless loop somewhere in the client side.
Any idea is most welcome…