Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Interfaces Jdbc > org.postgresql....
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 5 Topic 1948 of 1997
Post > Topic >>

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

by lbrtchx@[EMAIL PROTECTED] ("Albretch Mueller") May 6, 2008 at 10:16 PM

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@[EMAIL PROTECTED]
 ./pgpostmaster.sh
pgtest@[EMAIL PROTECTED]
 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@[EMAIL PROTECTED]
 select current_timestamp;
> ;
bash: syntax error near unexpected token `;'
pgtest@[EMAIL PROTECTED]
 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=#
~

-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc
 




 5 Posts in Topic:
org.postgresql.util.PSQLException: An I/O error occured while se
lbrtchx@[EMAIL PROTECTED]  2008-05-06 22:16:58 
Re: org.postgresql.util.PSQLException: An I/O error occured whil
lbrtchx@[EMAIL PROTECTED]  2008-05-06 22:33:35 
Re: org.postgresql.util.PSQLException: An I/O error occured whil
laurenz.albe@[EMAIL PROTE  2008-05-07 08:59:05 
Re: org.postgresql.util.PSQLException: An I/O error occured whil
lbrtchx@[EMAIL PROTECTED]  2008-05-07 05:54:35 
Re: org.postgresql.util.PSQLException: An I/O error occured whil
laurenz.albe@[EMAIL PROTE  2008-05-07 13:25:41 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Thu Jul 24 7:06:03 CDT 2008.