pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Error 08S01 (COMMUNICATION_ERROR)
2+ messages / 2 participants
[nested] [flat]

* Error 08S01 (COMMUNICATION_ERROR)
@ 2006-04-27 10:38 Jaime Vizán <jvizan@seglan.com>
  2006-04-27 11:34 ` Re: Error 08S01 (COMMUNICATION_ERROR) Oliver Jowett <oliver@opencloud.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Jaime Vizán @ 2006-04-27 10:38 UTC (permalink / raw)
  To: pgsql-jdbc

Hi,

 

I’m using PostgresSQL 7.4.7, pg74.215.jdbc3.jar in a computer which has
Debian GNU/Linux 3.1. Sometimes, when the database’s connection is going to
close I get the next PSQLException:

 

org.postgresql.util.PSQLException: An I/O error has occured while flushing
the output - Exception: java.net.SocketException:

Socket closed

Stack Trace:

 

java.net.SocketException: Socket closed

        at
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:99)

        at java.net.SocketOutputStream.write(SocketOutputStream.java:136)

        at
java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:66)

        at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:124)

        at org.postgresql.core.PGStream.flush(PGStream.java:411)

        at
org.postgresql.jdbc1.AbstractJdbc1Connection.closeV3(AbstractJdbc1Connection
.java:1147)

        at
org.postgresql.jdbc1.AbstractJdbc1Connection.close(AbstractJdbc1Connection.j
ava:1133)

            ………

 

End of Stack Trace

 

        at org.postgresql.core.PGStream.flush(PGStream.java:415)

        at
org.postgresql.jdbc1.AbstractJdbc1Connection.closeV3(AbstractJdbc1Connection
.java:1147)

        at
org.postgresql.jdbc1.AbstractJdbc1Connection.close(AbstractJdbc1Connection.j
ava:1133)

        at com.seglan.helena.BDConn.close(BDConn.java:112)

        at
com.seglan.helena.aplicaciones.DownloadDevolD.finalize(DownloadDevolD.java:1
54)

        at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)

        at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)

        at java.lang.ref.Finalizer.access$100(Finalizer.java:14)

        at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160)

 

I have catch this exception and I have got…

 

PSQLException's error code: 0

PSQLException's cause: null

PSQLException's sql state: 08S01

 

The PSQLException’s sql state tell me about COMMUNICATION ERROR but
PSQLException’s error code tell me about Successful Completion. I dont know
whether there is an error. I am confuse.

Does anyone explain me why happen this?

 

Thanks in advance.

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Error 08S01 (COMMUNICATION_ERROR)
  2006-04-27 10:38 Error 08S01 (COMMUNICATION_ERROR) Jaime Vizán <jvizan@seglan.com>
@ 2006-04-27 11:34 ` Oliver Jowett <oliver@opencloud.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Oliver Jowett @ 2006-04-27 11:34 UTC (permalink / raw)
  To: Jaime Vizán <jvizan@seglan.com>; +Cc: pgsql-jdbc

Jaime Vizán wrote:

> java.net.SocketException: Socket closed

>         at org.postgresql.core.PGStream.flush(PGStream.java:415)
>         at org.postgresql.jdbc1.AbstractJdbc1Connection.closeV3(AbstractJdbc1Connection.java:1147)
>         at org.postgresql.jdbc1.AbstractJdbc1Connection.close(AbstractJdbc1Connection.java:1133)
>         at com.seglan.helena.BDConn.close(BDConn.java:112)
>         at com.seglan.helena.aplicaciones.DownloadDevolD.finalize(DownloadDevolD.java:154)
>         at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
>         at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)
>         at java.lang.ref.Finalizer.access$100(Finalizer.java:14)
>         at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.ja

Closing connections from a finalizer can be a bit hairy, as the 
connection itself also has a finalizer that closes it down and it's not 
defined which one runs first .. If the connection's finalizer is run 
first, you will see this exception.

> The PSQLException’s sql state tell me about COMMUNICATION ERROR but 
> PSQLException’s error code tell me about Successful Completion. I dont 
> know whether there is an error. I am confuse.

The error code is vendor-specific, and the postgresql driver doesn't 
assign any meaning to it: it is always 0.

Use the SQLState, which is somewhat standardized.

-O



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2006-04-27 11:34 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-04-27 10:38 Error 08S01 (COMMUNICATION_ERROR) Jaime Vizán <jvizan@seglan.com>
2006-04-27 11:34 ` Oliver Jowett <oliver@opencloud.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox