Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with java serialization

Status
Not open for further replies.

MatEngel

Programmer
Jul 10, 2001
12
0
0
DE
I have a type of number crunching program, and as I wanted to be able to interrupt it and continue it later, I put everything in a single control class and several depending classes. At interrupt time, I write the control class (and implicitely the depending classes) with Java Object IO, at restart time, I read it again.

This works fine for the first time - or for the first two or three interrupts. But as the runs are longer (or, perhaps, my class has more subclasses), I just get an IO error that I do not understand. It occurs when I write the control class; my call to writeObject comes (via other classes) to a java.io.IOException: write error.
The problem seems to be reproducable (however, after two runs of about 5 hours, each, on a 300 MHz Windows computer).

Did anybody hear about a similar problem with serialization? Or is it more likely that it is a problem of the system, that was heavily loaded for CPU and virtual memory?

Thanks in advance
 
Meanwhile, I switched to JDK version 1.4 (former version was 1.2 or 1.3 - I am not sure); with the new version, the problem has disappeared.
 
I flushed the object output stream implicitely, by closing it. That holds both for JDK 1.4 and the previous version.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top