Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Client/Server + oOut.writeObject(tDataToClient); ERROR

Reply
Thread Tools

Client/Server + oOut.writeObject(tDataToClient); ERROR

 
 
Duncan Elliot
Guest
Posts: n/a
 
      05-17-2013
Hi there,

I am trying to implement the client / server example in this tutorial:

http://en.wikibooks.org/wiki/Java_Pr.../Client_Server

It works when the server is not hosted on the same machine as the client. When both are on the same machine I get an error:

java.net.SocketException: Connection reset by peer: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)

I suspect there is an additional step I need to take if I wanted to test it locally, any idea??

Thanks,

Duncnan
 
Reply With Quote
 
 
 
 
markspace
Guest
Posts: n/a
 
      05-17-2013
On 5/17/2013 6:42 AM, Duncan Elliot wrote:

> I suspect there is an additional step I need to take if I wanted to
> test it locally, any idea??


Generally speaking, no. This sort of things works fine on my machine, I
do it all the time. Check your local configuration, especially
firewalls and virus software. Turn that stuff off for a quick check to
see if it's interfering.

BTW that tutorial you linked to looks a little dubious at best. Why not
use the official one?

<http://docs.oracle.com/javase/tutorial/networking/sockets/>

 
Reply With Quote
 
 
 
 
Duncan Elliot
Guest
Posts: n/a
 
      05-17-2013
Thanks Mark - It is dubious, I cant get it to behave properly. I will give up on it.

Cheers,

Duncan
 
Reply With Quote
 
Arne Vajh°j
Guest
Posts: n/a
 
      05-18-2013
On 5/17/2013 11:39 AM, markspace wrote:
> BTW that tutorial you linked to looks a little dubious at best. Why not
> use the official one?
>
> <http://docs.oracle.com/javase/tutorial/networking/sockets/>


Good advice.

That wikibooks example is pretty bad in many ways.

Arne

 
Reply With Quote
 
Arved Sandstrom
Guest
Posts: n/a
 
      05-18-2013
On 05/17/2013 10:52 PM, Arne Vajh°j wrote:
> On 5/17/2013 11:39 AM, markspace wrote:
>> BTW that tutorial you linked to looks a little dubious at best. Why not
>> use the official one?
>>
>> <http://docs.oracle.com/javase/tutorial/networking/sockets/>

>
> Good advice.
>
> That wikibooks example is pretty bad in many ways.
>
> Arne
>

It's atrocious. I can sort of guess what programming languages and
operating systems the author used for this problem in the past, but I'll
wager he had less than 6 months of Java under his belt when he wrote
that abortion.

I started looking at the rest of the pages there for Java, and it's
worrisome stuff. Part of the problem is, a lot of it - maybe all of it -
is clearly written by a guy who doesn't have an excellent command of
English.

But why would you even want to waste your time? Better reference
material and tutorials on all of this have existed for 10-15 years.

AHS
 
Reply With Quote
 
Arne Vajh°j
Guest
Posts: n/a
 
      05-18-2013
On 5/17/2013 10:56 PM, Arved Sandstrom wrote:
> On 05/17/2013 10:52 PM, Arne Vajh°j wrote:
>> On 5/17/2013 11:39 AM, markspace wrote:
>>> BTW that tutorial you linked to looks a little dubious at best. Why not
>>> use the official one?
>>>
>>> <http://docs.oracle.com/javase/tutorial/networking/sockets/>

>>
>> Good advice.
>>
>> That wikibooks example is pretty bad in many ways.
>>

> It's atrocious. I can sort of guess what programming languages and
> operating systems the author used for this problem in the past,


You were also thinking Windows and C++?



> but I'll
> wager he had less than 6 months of Java under his belt when he wrote
> that abortion.
>
> I started looking at the rest of the pages there for Java, and it's
> worrisome stuff. Part of the problem is, a lot of it - maybe all of it -
> is clearly written by a guy who doesn't have an excellent command of
> English.
>
> But why would you even want to waste your time? Better reference
> material and tutorials on all of this have existed for 10-15 years.


The good thing about the internet is that is that everybody can
post what they want. The bad thing about internet is that everybody
can post what they want.



Arne


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0xffc Thread 0x228 DBC 0x437b94 Jet'. ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr bazzer ASP .Net 0 03-30-2006 03:16 PM
Error connecting to SQLExpress 2005 locally (error: 26 - Error Locating Server/Instance Specified) hfk0 ASP .Net 2 03-27-2006 08:43 PM
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x8fc Thread 0x934 DBC 0x437b94 Jet'. ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr bazzer ASP .Net 1 03-24-2006 04:20 PM
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x8fc Thread 0x934 DBC 0x437b94 Jet'. ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr bazzer ASP .Net 0 03-24-2006 02:22 PM
Error 500: ERROR: Cannot forward. Writer or Stream already obtained. Error JavaQueries Java 1 03-01-2005 06:30 PM



Advertisments