Re: question about rollback and SQLException - Mailing list pgsql-jdbc

From Dave Cramer
Subject Re: question about rollback and SQLException
Date
Msg-id 1043345138.1393.311.camel@inspiron.cramers
Whole thread Raw
In response to Re: question about rollback and SQLException  ("Andy Kriger" <akriger@greaterthanone.com>)
Responses Re: question about rollback and SQLException
List pgsql-jdbc
Andy,

The logs from the server would be good, I just tested rollback and it
works, but if there was something some how left in the query buffer,
this would be a problem

DAve
On Thu, 2003-01-23 at 12:44, Andy Kriger wrote:
> I don't really have something I can easily reduce out of my code.
>
> I started a transaction with Connection.setAutoCommit(false)
> Ran some SQL queries using PreparedStatements
> Ran a query that I knew would fail, throwing a SQLException
> Then I rolledback the transaction (just to be sure) with
> Connection.rollback()
>
> It was during Connection.rollback() that I received the exception that's in
> my first email. The stack trace picks up from my code as it enters the Resin
> & driver code.
>
> -----Original Message-----
> From: Dave Cramer [mailto:Dave@micro-automation.net]
> Sent: Thursday, January 23, 2003 12:32
> To: Andy Kriger
> Cc: Resin-Interest; Pgsql-Jdbc
> Subject: Re: [JDBC] question about rollback and SQLException
>
>
> can you send us logs from the server?
>
> or a test case which demonstrates this?
>
> Dave
>
> On Thu, 2003-01-23 at 12:07, Andy Kriger wrote:
> > I received this exception when trying to rollback a transaction through
> the
> > Postgres JDBC driver (build106) used by a webapp running in Resin (2.0.6).
> I
> > have tried setting up the connection pool in my web.xml to use both
> > javax.sql.DataSource and javax.sql.XADataSource, but both give me this
> > exception:
> >
> > java.sql.SQLException: ERROR:  parser: parse error at or near "qrollback"
> >         at
> org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:131)
> >         at
> >
> org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection
> > .java:482)
> >         at
> >
> org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection
> > .java:461)
> >         at
> >
> org.postgresql.jdbc1.AbstractJdbc1Connection.rollback(AbstractJdbc1Connectio
> > n.java:1031)
> >         at
> >
> com.caucho.sql.UserConnectionAdapter.rollback(UserConnectionAdapter.java:470
> > )
> >         at com.gto.db.SqlTransaction.rollback(SqlTransaction.java:132)
> >
> > Any idea what that means and how I can prevent it from occuring?
> >
> > thx
> > andy kriger
> >
> >
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 6: Have you searched our list archives?
> >
> > http://archives.postgresql.org
> --
> Dave Cramer <Dave@micro-automation.net>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
--
Dave Cramer <Dave@micro-automation.net>


pgsql-jdbc by date:

Previous
From: Kris Jurka
Date:
Subject: Re: question about rollback and SQLException
Next
From: "V. Cekvenich"
Date:
Subject: Re: Postgres JDBC3 driver compliance