Cannot invoke a rollback operation when the AutoCommit mode is set to "true".

377 views
Skip to first unread message

MartinAfterDark

unread,
Feb 3, 2017, 3:00:29 AM2/3/17
to sql2o
Using sql2o-1.6-RC3 and microsoft JDBC 4.2

com.microsoft.sqlserver.jdbc.SQLServerException: Cannot invoke a rollback operation when the AutoCommit mode is set to "true".
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:191)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.rollback(SQLServerConnection.java:2696)
at com.zaxxer.hikari.pool.ProxyConnection.rollback(ProxyConnection.java:361)
at com.zaxxer.hikari.pool.HikariProxyConnection.rollback(HikariProxyConnection.java)
at org.sql2o.Connection.rollback(Connection.java:124)
at org.sql2o.Connection.onException(Connection.java:68)
at org.sql2o.Query.executeUpdate(Query.java:661)

this problem goes away when i set:

connection.setRollbackOnException(false);

But shouln't rollback be set to false by default when using autoCommit?


Reply all
Reply to author
Forward
0 new messages