Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id A4E79B5FA96 for ; Tue, 31 May 2011 21:20:03 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 12439-01-6 for ; Wed, 1 Jun 2011 00:19:55 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from www.postnewspapers.com.au (www.postnewspapers.com.au [173.230.139.50]) by mail.postgresql.org (Postfix) with ESMTP id 06DE4B5DD85 for ; Tue, 31 May 2011 21:19:05 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by www.postnewspapers.com.au (Postfix) with ESMTP id 6718310D; Tue, 31 May 2011 20:19:05 -0400 (EDT) X-Virus-Scanned: amavisd-new at postnewspapers.com.au.com Received: from www.postnewspapers.com.au ([127.0.0.1]) by localhost (www.postnewspapers.com.au [127.0.0.1]) (amavisd-new, port 10024) with LMTP id gnReOoGjuo0i; Tue, 31 May 2011 20:19:04 -0400 (EDT) Received: from mail.postnewspapers.com.au (ppp171-128.static.internode.on.net [150.101.171.128]) by www.postnewspapers.com.au (Postfix) with ESMTP id 597EC2D; Tue, 31 May 2011 20:19:04 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.postnewspapers.com.au (Postfix) with ESMTP id 66AF9AEC15; Wed, 1 Jun 2011 08:19:03 +0800 (WST) X-Virus-Scanned: Debian amavisd-new at postnewspapers.com.au Received: from mail.postnewspapers.com.au ([127.0.0.1]) by localhost (mail.postnewspapers.com.au [127.0.0.1]) (amavisd-new, port 10024) with LMTP id W49uOBlmWPqs; Wed, 1 Jun 2011 08:18:58 +0800 (WST) Received: from [10.1.1.5] (unknown [124.169.247.86]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "Craig Ringer", Issuer "POST Certificate Authority" (verified OK)) by mail.postnewspapers.com.au (Postfix) with ESMTPSA id B275DAE3ED; Wed, 1 Jun 2011 08:18:57 +0800 (WST) Message-ID: <4DE5856B.9000206@postnewspapers.com.au> Date: Wed, 01 Jun 2011 08:18:51 +0800 From: Craig Ringer User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc15 Thunderbird/3.1.10 MIME-Version: 1.0 To: emilu@encs.concordia.ca CC: pgsql-jdbc@postgresql.org Subject: Re: "postgresql-9.0-801.jdbc4.jar" Causing "Error committing transaction. Cause: org.postgresql.util.PSQLException: Cannot commit when autoCommit is enabled." Exception References: <4DE52047.5030900@encs.concordia.ca> In-Reply-To: <4DE52047.5030900@encs.concordia.ca> 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: 201105/93 X-Sequence-Number: 21923 On 06/01/2011 01:07 AM, Emi Lu wrote: > When update/insert/delete is called, always got: > =================================================== > ### Error committing transaction. Cause: > org.postgresql.util.PSQLException: Cannot commit when autoCommit is > enabled. Sounds like MyBatis expects autocommit to be disabled because it does its own explicit BEGIN/COMMIT, but you've got it turned on. The newer JDBC driver detects this and complains about it, where the older one presumably ignored a COMMIT issued while in autocommit mode. Add "autoCommit=false" to your connection parameters. "autoCommit" doesn't appear to be documented in http://jdbc.postgresql.org/documentation/head/connect.html#connection-parameters , which is surprising. -- Craig Ringer