Re: Weird connection problems with SQLExceptions being thrown

From: "Dave Cramer" <Dave(at)micro-automation(dot)net>
To: "'Christian Cabanero'" <chumpboy(at)yahoo(dot)com>, <pgsql-jdbc(at)postgresql(dot)org>
Cc: <hphan(at)alatron(dot)com>
Subject: Re: Weird connection problems with SQLExceptions being thrown
Date: 2002-03-23 01:01:48
Message-ID: 02b501c1d206$4f88b2c0$807ba8c0@inspiron
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Christian,

The latest development driver on the site should take care of this
problem.

It is a known problem with the 7.2 driver

Dave

> -----Original Message-----
> From: pgsql-jdbc-owner(at)postgresql(dot)org
> [mailto:pgsql-jdbc-owner(at)postgresql(dot)org] On Behalf Of
> Christian Cabanero
> Sent: Friday, March 22, 2002 7:59 PM
> To: pgsql-jdbc(at)postgresql(dot)org
> Cc: hphan(at)alatron(dot)com
> Subject: [JDBC] Weird connection problems with SQLExceptions
> being thrown
>
>
> 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(SQLRunne
> rPostgresqlImp
> l.java:149)
> at
> alatron.db.SQLRunnerPostgresqlImpl.executeInsert(SQLRunnerPost
> gresqlImpl.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
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an
> appropriate subscribe-nomail command to
> majordomo(at)postgresql(dot)org so that your message can get through
> to the mailing list cleanly
>
>

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message raghu nidagal 2002-03-23 04:51:36 Updateable ResultSet
Previous Message Christian Cabanero 2002-03-23 00:58:53 Weird connection problems with SQLExceptions being thrown