From: | "Christian Cabanero" <chumpboy(at)yahoo(dot)com> |
---|---|
To: | <pgsql-jdbc(at)postgresql(dot)org> |
Cc: | <hphan(at)alatron(dot)com> |
Subject: | Weird connection problems with SQLExceptions being thrown |
Date: | 2002-03-23 00:58:53 |
Message-ID: | 000001c1d205$e8064900$e000a8c0@thematrix |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
I've observed some weird behavior when SQLExceptions are thrown when they
are SQL-related exceptions (i.e., referential integrity violations or
unique-index violations) and NOT non-connection problems (i.e. loosing a
network). What seems to happen is that if I have a connection and in the
course of executing several insert/update statements and several of them
throw SQLExceptions that are a combination of referential integrity
violations, after about 4 SQLExceptions I get a weird error:
Root Cause:
No results were returned by the query.
at org.postgresql.jdbc2.Statement.executeQuery(Statement.java:58)
at
alatron.db.SQLRunnerPostgresqlImpl.getSequenceNextVal(SQLRunnerPostgresqlImp
l.java:149)
at
alatron.db.SQLRunnerPostgresqlImpl.executeInsert(SQLRunnerPostgresqlImpl.jav
a:84)
yadda yadda yadda.
From that point forward I can't use the connection object to perform ANY SQL
Statements. For example, this error comes up when trying to run a normal
SELECT statement which definitely works afterward in just a psql session.
The key thing is that after 2 or 3 SQL Exceptions I can still perform
updates and inserts but after on the 4th one it starts returning this error.
This seems very strange as a SQL-related exception I believe should not hose
up a connection.
I've also tried explicitly setting autoCommit(true) on the Connection object
but that doesn't seem to help. Is this a known problem with the JDBC
driver?
Thanks,
Christian Cabanero
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
From | Date | Subject | |
---|---|---|---|
Next Message | Dave Cramer | 2002-03-23 01:01:48 | Re: Weird connection problems with SQLExceptions being thrown |
Previous Message | Dave Cramer | 2002-03-22 19:46:17 | Re: JDBC Logging & log4j |