From: David Kerr <dmk@mr-paradox.net>
To: Kevin Grittner <Kevin.Grittner@wicourts.gov>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Unable to commit: transaction marked for rollback
Date: Thu, 01 Jul 2010 11:57:55 -0700
Message-ID: <4C2CE533.8010301@mr-paradox.net> (raw)
In-Reply-To: <4C2C98930200002500032F20@gw.wicourts.gov>
References: <20100701181528.GA97516@mr-paradox.net>
<4C2C98930200002500032F20@gw.wicourts.gov>
On 7/1/2010 11:30 AM, Kevin Grittner wrote:
> David Kerr<dmk@mr-paradox.net> wrote:
>
>> javax.transaction.RollbackException: Unable to commit: transaction
>> marked for rollback
>>
>> Can someone give me a scenario where this would happen?
>
> It sounds like the right exception for the case where a previous
> statement generated an error within a database transaction. After
> that, any attempt to run a statement would generate this at the
> PostgreSQL level:
>
> ERROR: current transaction is aborted, commands ignored until end
> of transaction block
>
> until a ROLLBACK or COMMIT (which would be treated as a ROLLBACK
> because of the transaction state) is executed.
>
> That sounds like exactly the case for which RollbackException was
> created:
>
> http://java.sun.com/javase/6/docs/api/javax/transaction/TransactionRolledbackException.html
>
> -Kevin
>
Would postgres normally log the error in the TX?
(it's not, which is why i'm asking)
Thanks!
Dave
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: dmk@mr-paradox.net, Kevin.Grittner@wicourts.gov
Subject: Re: Unable to commit: transaction marked for rollback
In-Reply-To: <4C2CE533.8010301@mr-paradox.net>
References: <20100701181528.GA97516@mr-paradox.net> <4C2C98930200002500032F20@gw.wicourts.gov> <4C2CE533.8010301@mr-paradox.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox