1

I am dealing with large Java object(single object may be as big as 1GB).When I try trasfering objects larger than 104004 KB it is throwing EOFException. Is it because my object is too large for the ObjectInputStream to hold or is there any other reason. What could be solution of this problem?

  • 2
    Why are you operating on objects of such size? Can't you split them into many smaller objects? You could avoid many problems, like having to restart data transfer of the whole thing in case of error. – Jezor Nov 01 '16 at 16:51
  • 1
    How did they get this large? An object graph with millions of objects, or huge arrays? – Marko Topolnik Nov 01 '16 at 16:51
  • 1
    Who on earth serialized a Java object into a 1 GB file? Maybe you should rethink the architecture of your system. –  Nov 01 '16 at 16:57
  • 1
    Are you getting EOF while writing, or while reading (which is more common)? – Pelit Mamani Nov 01 '16 at 16:59
  • 1
    I am executing a Machine learning (NLP) algorithm. For that I have to compute something considering many trainging example simultaneously thus the objects become large. (I have total dataset of 15 GB). – chinmay choudhary Nov 01 '16 at 17:08
  • 1
    @Pelit I am getting it while reading an object throught object stream. – chinmay choudhary Nov 01 '16 at 17:09
  • Most likely your problem is unrelated to the actual object size and the written data is corrupted in some way, again most likely incompletely written from the start. Check which kind of object is supposed to deserialize when the EoF happens, then check that types serialization/deserialization. – Durandal Nov 01 '16 at 17:28

0 Answers0