The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.

EOFException on sending object

Dear all,

I've been struggeling with this issue for days now and I'm completely stuck on this.
The thing what I want to do is send an object over a socket.

I get the following error when I execute the send:
at java.io.ObjectInputStream$PeekInputStream.readFull y(Unknown Source)
at java.io.ObjectInputStream$BlockDataInputStream.rea dShort(Unknown Source)
at java.io.ObjectInputStream.readStreamHeader(Unknown Source)
at java.io.ObjectInputStream.<init>(Unknown Source)
at Agent.runAgent(Agent.java:125)
at Agent.<init>(Agent.java:53)
at Agent.main(Agent.java:193)

Re: EOFException on sending object

You left off the first line(s) of the error message. It would give the name of the exception and maybe some more details.
What you did post shows that your code was creating an ObjectInputStream object at line 125 when the error occurred.

If you want any help on this you will have to create a SSCCE that shows the problem. Your zip files contain TOO many source files.
When I work on a client-server problem I put all the classes into a single file so all the debugging print outs are on one screen and in time sequence.