A result was returned by the statement, when none was expected - Mailing list pgsql-hackers

From Eric Scroger
Subject A result was returned by the statement, when none was expected
Date
Msg-id 3C85466F.9010606@carl.org
Whole thread Raw
List pgsql-hackers
JDBC-ers,

We are doing an INSERT and occasionally Postgres throws a SQLException
because there are unexpected results (see stacktrace below), maybe 10%
of the time,
Any idea why this would happen when it works over 90% of the time?
However, it appears the insert is completed successfully.

We have looked at the source code for ResultSet.java and noticed
the method reallyResultSet() returns true if any of the fields are non-null.
I hope that helps in debugging.

Also, we are running Postgres 7.1 with JDK1.2.1.

Regards,

Eric

--------------------------------------------------------------------------

IINSERT INTO bad_urls(ID,DATA,ATTEMPTS,REASON) VALUES
(3375,'http://www.oit.itd.umich.edu/projects/adw2k/chordata/aves.html',0,'Unknown
Host')

A result was returned by the statement, when none was expected.
    at java.lang.Throwable.fillInStackTrace(Native Method)
    at java.lang.Throwable.fillInStackTrace(Compiled Code)
    at java.lang.Throwable.<init>(Compiled Code)
    at java.lang.Exception.<init>(Compiled Code)
    at java.sql.SQLException.<init>(SQLException.java:98)
    at org.postgresql.util.PSQLException.<init>(PSQLException.java:23)
    at org.postgresql.jdbc2.Statement.executeUpdate(Statement.java:80)
    at
org.postgresql.jdbc2.PreparedStatement.executeUpdate(PreparedStatement.java:122)
    at InsertError.record(InsertError.java:98)
    at InsertError.record(InsertError.java:69)
    at wbCheckUrl$CheckThread.run(wbCheckUrl.java:307)


pgsql-hackers by date:

Previous
From: mlw
Date:
Subject: Re: Postgresql backend to perform vacuum automatically
Next
From: Thomas Lockhart
Date:
Subject: Python client code (was, Mandrake RPMs uploaded)