Re: "postgresql-9.0-801.jdbc4.jar" Causing "Error committing transaction. Cause: org.postgresql.util.PSQLException: Cannot commit when autoCommit is enabled." Exception
| От | Craig Ringer |
|---|---|
| Тема | Re: "postgresql-9.0-801.jdbc4.jar" Causing "Error committing transaction. Cause: org.postgresql.util.PSQLException: Cannot commit when autoCommit is enabled." Exception |
| Дата | |
| Msg-id | 4DE5856B.9000206@postnewspapers.com.au обсуждение исходный текст |
| Ответ на | "postgresql-9.0-801.jdbc4.jar" Causing "Error committing transaction. Cause: org.postgresql.util.PSQLException: Cannot commit when autoCommit is enabled." Exception (Emi Lu <emilu@encs.concordia.ca>) |
| Ответы |
Re: "postgresql-9.0-801.jdbc4.jar" Causing "Error committing
transaction. Cause: org.postgresql.util.PSQLException: Cannot commit when
autoCommit is enabled." Exception
Re: "postgresql-9.0-801.jdbc4.jar" Causing "Error committing transaction. Cause: org.postgresql.util.PSQLException: Cannot commit when autoCommit is enabled." Exception |
| Список | pgsql-jdbc |
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
В списке pgsql-jdbc по дате отправления: