Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id A435E63332D for ; Thu, 1 Jul 2010 16:01:24 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 07732-01 for ; Thu, 1 Jul 2010 19:01:16 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from vexbert.mr-paradox.net (vexbert.mr-paradox.net [198.145.180.174]) by mail.postgresql.org (Postfix) with ESMTP id 886CC6332ED for ; Thu, 1 Jul 2010 16:01:17 -0300 (ADT) Received: from [192.168.1.100] (c-24-20-21-238.hsd1.or.comcast.net [24.20.21.238]) (Authenticated sender: dmk) by vexbert.mr-paradox.net (Postfix) with ESMTP id D5078845E7; Thu, 1 Jul 2010 15:01:15 -0400 (EDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.96 at vexbert.mr-paradox.net Message-ID: <4C2CE533.8010301@mr-paradox.net> Date: Thu, 01 Jul 2010 11:57:55 -0700 From: David Kerr User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.10) Gecko/20100512 Thunderbird/3.0.5 MIME-Version: 1.0 To: Kevin Grittner CC: pgsql-jdbc@postgresql.org Subject: Re: Unable to commit: transaction marked for rollback References: <20100701181528.GA97516@mr-paradox.net> <4C2C98930200002500032F20@gw.wicourts.gov> In-Reply-To: <4C2C98930200002500032F20@gw.wicourts.gov> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201007/3 X-Sequence-Number: 20668 On 7/1/2010 11:30 AM, Kevin Grittner wrote: > David Kerr 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