just increasing points:))
Main Topics
Browse All TopicsHi!
Below is my entire..code...just feel that it would be better to link the rather than paste it here.....
http://www.geocities.com/s
http://www.geocities.com/s
http://www.geocities.com/s
I'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
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
ok the code is updated catch blocks
and here are erros....
//////////////////////////
error in server fileCtrlAllows()
java.io.EOFException
at java.io.ObjectInputStream$
at java.io.ObjectInputStream.
at java.io.ObjectInputStream.
at networking.Server.fileCtrl
at networking.Server.prepareT
at networking.Server.processC
at networking.Server.runServe
at networking.Server$ServerTh
error in server processConnection()
java.io.EOFException
at java.io.ObjectInputStream$
at java.io.ObjectInputStream.
at java.io.ObjectInputStream.
at networking.Server.processC
at networking.Server.runServe
at networking.Server$ServerTh
null
error in server processConnection()
java.io.EOFException
at java.io.ObjectInputStream$
at java.io.ObjectInputStream.
at java.io.ObjectInputStream.
at networking.Server.processC
at networking.Server.runServe
at networking.Server$ServerTh
null
/////this error looopss for ever
//////////////////////////
//////////////////////////
Error in Client.initFileTrans();
java.io.OptionalDataExcept
at java.io.ObjectInputStream.
at java.io.ObjectInputStream.
at networking.Client.initFile
at networking.Client.sendInpu
at networking.Client.processC
at networking.Client.runClien
at networking.Client.access$3
at networking.Client$ServerTh
Error in Client.runClient();
java.io.OptionalDataExcept
at java.io.ObjectInputStream.
at java.io.ObjectInputStream.
at networking.Client.processC
at networking.Client.runClien
at networking.Client.access$3
at networking.Client$ServerTh
false overwirte2
//////////////////////////
ok...I've removed the package names ...and posted the latest version I had with OIS/OOS up until I changed tactics :))
and by the way there are no resets in this...one.
how you can reproduce the error..:
if you add some files...to the client and send it to the server for more detail you can read the Readme.txt file...here
http://www.geocities.com/s
once you have done that...try to send to server...might work fine...but try again...by just clicking send again.
..and around the 3rd time..you'll get the below error...due to that everything gets unsync somehow
//On client side
Error in Client.sendInputFile();
java.io.EOFException
at java.io.ObjectInputStream$
ream.java:2435)
at java.io.ObjectInputStream.
at java.io.ObjectInputStream.
at Client.sendInputFile(Clien
at Client.processConnection(C
at Client.runClient(Client.ja
at Client.access$300(Client.j
at Client$ServerThread.run(Cl
Server terminated connection
//The last errors produced... on server side..
java.lang.ClassCastExcepti
at Server.processConnection(S
at Server.runServer(Server.ja
at Server$ServerThread.run(Se
However..I'd like to thank you for ..your effort to help me...but I feel...that since
you can not produce the same error.and there is no one else responding to this
question...its time to close this question. Additionally I have found my own solution
simply using more primitve streams..stated earlier...
Business Accounts
Answer for Membership
by: Thunder_screamPosted on 2004-03-15 at 23:22:31ID: 10604034
sorry about the low points but do not have much left....but I need help...