[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

4.2

Client/ server socket... optionalDataException randomly...

Asked by Thunder_scream in Java Programming Language

Tags: optionaldataexception

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.java
http://www.geocities.com/shomnv97/Server.java
http://www.geocities.com/shomnv97/serializedObj.java

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

[+][-]03/25/04 07:00 AM, ID: 10677568Accepted Solution

Your question has an Asker Certified™ answer! Thunder_scream verified that this solution worked for them--which means it will likely work for you, too. Click to view the solution free for 30-days now.

About this solution

Zone: Java Programming Language
Tags: optionaldataexception
Sign Up Now!
Solution Provided By: PashaMod
Participating Experts: 2
Solution Grade: B
 
[+][-]03/15/04 11:22 PM, ID: 10604034Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/15/04 11:25 PM, ID: 10604047Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/16/04 04:58 AM, ID: 10605649Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/16/04 04:59 AM, ID: 10605655Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/16/04 05:56 AM, ID: 10606084Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/16/04 06:44 AM, ID: 10606531Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/16/04 09:28 AM, ID: 10608003Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/16/04 07:05 PM, ID: 10612172Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/19/04 02:28 AM, ID: 10631894Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/19/04 09:03 AM, ID: 10634620Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/19/04 09:08 AM, ID: 10634670Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/19/04 10:45 AM, ID: 10635597Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/19/04 11:21 AM, ID: 10635937Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/19/04 02:34 PM, ID: 10637553Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/19/04 04:22 PM, ID: 10638096Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/19/04 05:51 PM, ID: 10638466Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/19/04 06:04 PM, ID: 10638531Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/21/04 09:06 AM, ID: 10644448Administrative Comment

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20100215-EE-VQP-121