Could not commit with auto-commit set on Exception with JDBC 12.1 (Doc ID 1633346.1)

Last updated on JULY 25, 2017

Applies to:

JDBC - Version 12.1.0.1.0 and later
Information in this document applies to any platform.

Symptoms

Application is receiving
java.sql.SQLException: Could not commit with auto-commit set on

While using the following commit code in JDBC driver 12.1.0.1 connecting to an Oracle 12c database.


java.sql.SQLException: Could not commit with auto-commit set on
       at oracle.jdbc.driver.PhysicalConnection.commit(PhysicalConnection.java:4439)
       at oracle.jdbc.driver.PhysicalConnection.commit(PhysicalConnection.java:4486)
       at oracle.jdbc.OracleConnectionWrapper.commit(OracleConnectionWrapper.java:140)


The code works successfully with prior versions of the JDBC driver.

Changes

 

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms