Re: Error 08S01 (COMMUNICATION_ERROR)

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Jaime Vizán <jvizan(at)seglan(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Error 08S01 (COMMUNICATION_ERROR)
Date: 2006-04-27 11:34:41
Message-ID: 4450AC51.5050305@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Mads N. Vestergaard 2006-04-27 12:19:46 java.sql.SQLException: No suitable driver
Previous Message Jaime Vizán 2006-04-27 10:38:29 Error 08S01 (COMMUNICATION_ERROR)