2 messages in com.mysql.lists.javaProblem with autocommit in MySQL v3.2...
FromSent OnAttachments
Heather Hum12 Oct 2001 14:56 
Mark Matthews12 Oct 2001 16:04 
Subject:Problem with autocommit in MySQL v3.23.42/MM JDBC v2.0.6.1
From:Heather Hum (Heat@bitflash.com)
Date:10/12/2001 02:56:22 PM
List:com.mysql.lists.java

Hi,

I'm trying to integrate a MySQL v3.23.42 DB on a Win2K server with a Java application (v1.3.1) running on a Weblogic 5.1 server (on the same Win2K server). I'm using the MM JDBC driver v 2.0.6.1 for the database connection. Weblogic is able to create a connection but when my application tries to save data to the MySQL database, I get the attached error.

java.sql.SQLException: Can't call commit when autocommit=true at org.gjt.mm.mysql.Connection.commit(Connection.java:531) at weblogic.jdbcbase.pool.Connection.commit(Connection.java:133)

It seems as though Weblogic is trying to issue a commit when autocommit is turned on and MySQL? or the MM driver? doesn't support that. I looked in the MySQL documentation for details on turning autocommit off when I start up the mysqld process but did not find anything that worked.

I also looked in the src for the MM driver (Connection.java) and noticed a relaxAutoCommit boolean that is set to false. Presumably if I set this to true my error will go away. Is there a way to enable this flag without having to recompile the source?

I appreciate any help.

Thanks, Heather