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

"postgresql-9.0-801.jdbc4.jar" always cause "org.postgresql.util.PSQLException: Cannot commit when autoCommit is enabled" Exception

From: Emi Lu <emilu(at)encs(dot)concordia(dot)ca>
To: pgsql-general(at)postgresql(dot)org
Subject: "postgresql-9.0-801.jdbc4.jar" always cause "org.postgresql.util.PSQLException: Cannot commit when autoCommit is enabled" Exception
Date: 2011-05-31 16:51:35
Message-ID: 4DE51C97.20104@encs.concordia.ca (view raw or flat)
Thread:
Lists: pgsql-general
Hello list,

. Postgresql8.3
. mybatis-3.0.5-SNAPSHOT.jar
. mybatis-spring-1.0.1-SNAPSHOT.jar
. spring3.0.5

. postgresql-9.0-801.jdbc4.jar



SqlSession sql_session = sqlSessionFactory.openSession(false);
....
sql_session.commit();


Always got:
===================
### Error committing transaction.  Cause: 
org.postgresql.util.PSQLException: Cannot commit when autoCommit is enabled.



While for "8.4-702 JDBC 4", the same codes, no error at all.

Is this a bug for "postgresql-9.0-801.jdbc4.jar"?

Thanks a lot!
Emi


Responses

pgsql-general by date

Next:From: David JohnstonDate: 2011-05-31 16:57:51
Subject: Re: Function Column Expansion Causes Inserts To Fail
Previous:From: hernan gonzalezDate: 2011-05-31 16:45:10
Subject: Some clarification about TIMESTAMP

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