Skip site navigation (1) Skip section navigation (2)

Re: Unable to commit: transaction marked for rollback

From: David Kerr <dmk(at)mr-paradox(dot)net>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Unable to commit: transaction marked for rollback
Date: 2010-07-01 18:57:55
Message-ID: 4C2CE533.8010301@mr-paradox.net (view raw or flat)
Thread:
Lists: pgsql-jdbc
On 7/1/2010 11:30 AM, Kevin Grittner wrote:
> David Kerr<dmk(at)mr-paradox(dot)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

In response to

Responses

pgsql-jdbc by date

Next:From: Kevin GrittnerDate: 2010-07-01 19:20:08
Subject: Re: Unable to commit: transaction marked for rollback
Previous:From: Kevin GrittnerDate: 2010-07-01 18:30:59
Subject: Re: Unable to commit: transaction marked for rollback

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group