Hi!
Below is my entire..code...just feel that it would be better to link the rather than paste it here.....
http://www.geocities.com/shomnv97/Client.javahttp://www.geocities.com/shomnv97/Server.javahttp://www.geocities.com/shomnv97/serializedObj.javaI'm using ObjectInpu/ouputStream and would like to keep it so if possible....and I have j2sdk1.4.2_03 running winxp and fedora that is tried it on both os.
ok the Problem:
I'm a bit confused, because if I debug my apps with jbuilder 9 everything works as it should but when the application runs
and I send a file to the server from the client....it randomly gives me optionalDataException or something related with Serialization or ObjectStream exception
I know where the error is but can not do anything about it.....or i think I know...:))
the input stream reads one inputstream twice...for some unknown reson...??
that is it reads the same incomming object twice...I have tried reset() ...both
before my output.WriteObject, output.flush and After.....and both ..before and after :)) with no ...success..
anyway..the error is somewhere in here....
in the server.java
prepareToReciveFile();
..or in client.java
sendInputFile();
The app works fine or gives me less exceptions if there is some delay..
e.g...if I have my client running on another machine somewhere..
If you decide to help me ....remove the "package networking" reference in the begining of each java file :)
To summarize...this app establishes a socket connection between client and a server and .....sends a file..to the server...the server produces a ouput file...
and saves it both in its working directory and sends a copy to the client...(its in this process that I get my error.)
The entire idea is to be able to send a computational problem to the server...adn the server..divides the task between its conected clients and send back the result..to the initial client......or simply send any file...to the server...this is some extra information...really...
Would appriciate if anyone could help me out correcting this ..bugg...and comments on code would be welcomed.
Thanks