org.postgresql.util.PSQLException: An I/O error occured while sending to the backend

From: "Albretch Mueller" <lbrtchx(at)gmail(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: org.postgresql.util.PSQLException: An I/O error occured while sending to the backend
Date: 2008-05-07 02:16:58
Message-ID: 9ef66fac0805061916y5cf117a1m561235b0e5c1dcbe@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hi,
~
I am having a problem with PG I don't quite understand. I know the
server is running but I am getting exceptions as it is not. The
exception is thrown exactly after setting the parameters of a
preparedStatement, when I try to execute the query
~
ResultSet RS = PSt.executeQuery();
~
org.postgresql.util.PSQLException: An I/O error occured while sending
to the backend.
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:218)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:451)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:350)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:254)
at JDBCPrepStSelWhr06.getRx(JDBCPrepStSelWhr06.java:223)
at JDBCPrepStSelWhr06Test.main(JDBCPrepStSelWhr06Test.java:72)
Caused by: java.io.IOException: Stream closed
at sun.nio.cs.StreamEncoder.ensureOpen(StreamEncoder.java:26)
at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:121)
at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:212)
at org.postgresql.core.PGStream.flush(PGStream.java:507)
at org.postgresql.core.v3.QueryExecutorImpl.sendSync(QueryExecutorImpl.java:676)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:191)
... 5 more
~
I do know PG is running in my box:
~
sh-3.1# telnet localhost 5432
Trying 127.0.0.1...
Connected to Knoppix.
Escape character is '^]'.
~
pgtest(at)Knoppix:~/bin$ ./pgpostmaster.sh
pgtest(at)Knoppix:~/bin$ psql -l
List of databases
Name | Owner | Encoding
-----------+--------+-----------
postgres | pgtest | SQL_ASCII
template0 | pgtest | SQL_ASCII
template1 | pgtest | SQL_ASCII
testdb | pgtest | SQL_ASCII
(4 rows)

pgtest(at)Knoppix:~/bin$ select current_timestamp;
> ;
bash: syntax error near unexpected token `;'
pgtest(at)Knoppix:~/bin$ psql testdb;
Welcome to psql 8.3.1, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit

testdb=# select current_timestamp;
now
-------------------------------
2008-05-06 21:50:52.618359-04
(1 row)

testdb=# select * from testtbl;
testid | usr | pw | usrid | ctm | laxtm
--------+-------+------+---------+---------------+---------------
1 | usr00 | pw00 | usrpw00 | 1068457566818 | 1068457579818
2 | usr02 | pw02 | usrpw02 | 1068455566818 | 1068455566999
3 | usr04 | pw04 | usrpw04 | 1068447566818 | 1068447566865
(3 rows)

testdb=#
~

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Albretch Mueller 2008-05-07 02:33:35 Re: org.postgresql.util.PSQLException: An I/O error occured while sending to the backend
Previous Message Stephen Frost 2008-05-06 14:01:20 JDBC and GSSAPI/Krb5 with uDig