File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes EOFException in Data class during testing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "EOFException in Data class during testing" Watch "EOFException in Data class during testing" New topic

EOFException in Data class during testing

K. Tsang

Joined: Sep 13, 2007
Posts: 1973

Hello all, when I did my multi-threading tests sometimes I get the EOFException when my record number reaches like 159.

Subsequent runs will affect my find method yet it still returns the correct number of records. The most interesting point is when my test program encounter create method, it continues to create but in this order:
159, 161, 163....
only odd numbers from 159 onwards.

Ok I figured it out what I did wrong. My total records calculation is wrong. Now I fixed the problem.

Consider Paul's rocket mass heater.
subject: EOFException in Data class during testing
Similar Threads
end of file and new IO
EOF Exception while reading Data Section
Opinions On Reading Data File
Locking & Synchronization on Bodgitt & Scarper
Using record cache and booking method