X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id DD77F3A19DE for ; Fri, 14 Jan 2005 21:59:38 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 23358-01 for ; Fri, 14 Jan 2005 21:59:23 +0000 (GMT) Received: from web41506.mail.yahoo.com (web41506.mail.yahoo.com [66.218.93.89]) by svr1.postgresql.org (Postfix) with SMTP id C557A3A22F0 for ; Fri, 14 Jan 2005 21:59:22 +0000 (GMT) Received: (qmail 61371 invoked by uid 60001); 14 Jan 2005 21:59:21 -0000 Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; b=qmlWHykwVi1QD0oShKvJZP8Z5LmyFwKOlP8DcBmqEpxzBvgZhdYyy1jTs+4UDaxaVX7PM8ojzvmsSP1ByTvTeGCuTQk5CqRs8fwOgXFeCwIb3dSkIn+3sPpbZ4ah7z0hn2D4pEpO+m4a0qu1jZjdDBxJeW0zZJXYUY3R6SA7vD8= ; Message-ID: <20050114215921.61369.qmail@web41506.mail.yahoo.com> Received: from [65.168.86.239] by web41506.mail.yahoo.com via HTTP; Fri, 14 Jan 2005 13:59:21 PST Date: Fri, 14 Jan 2005 13:59:21 -0800 (PST) From: Stephen McConnell Subject: An I/O error occured while sending to the backend. To: pgsql-jdbc@postgresql.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.374 tagged_above=0 required=5 tests=DNS_FROM_RFC_ABUSE X-Spam-Level: X-Archive-Number: 200501/133 X-Sequence-Number: 12013 I am developing using the new PostgreSQL 8.0.0 rc5 under Windoz XP (sorry). I am also using Eclipse with the MyEclipseWorkbench and ACCESSING A DATABASE ON localhost. In the code I make a valid connection and immediately set up a prepared statement and execute a query. The code is: pstmt = connection.prepareStatement(SQL_GET_SEQUENCE); pstmt.setString(1, this.name); rs = pstmt.executeQuery(); The query is: private static final String SQL_GET_SEQUENCE = "SELECT " + "seed " + "FROM " + "stocks.sequencer " + "WHERE " + "name = ?"; or SELECT seed FROM stocks.sequencer WHEREname = 'test_sequence' I am using the pg80b1.308jdbc3.jar jdbc driver. The above query works through pgAdmin III and the MyEclipse Database Explorer.... But when I run the above java code I receive the infamous Exception: java.io.IOException: Stream closed Stack Trace: java.io.IOException: Stream closed at sun.nio.cs.StreamEncoder.ensureOpen(StreamEncoder.java:38) at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:151) at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:213) at org.postgresql.core.PGStream.flush(PGStream.java:485) at org.postgresql.core.v3.QueryExecutorImpl.sendSync(QueryExecutorImpl.java:616) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:165) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:363) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:308) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:223) at com.scawa.stockanalyzer.db.Sequencer.reseed(Sequencer.java:95) at com.scawa.stockanalyzer.db.Sequencer.next(Sequencer.java:73) at com.scawa.stockanalyzer.test.Tester.main(Tester.java:46) Others have said this is a TCP/IP problem with a firewall, but it's pretty apparent that since I'm accessing "localhost" (jdbc:postgresql://localhost:5432/test_database) that It's not a "firewall" problem UNLESS there's a problem with the Windoz XP firewall. Any ideas? Suggestions? Stephen McConnell =====