remove logger

Skip to first unread message

Mouhamad Arafeh

Feb 24, 2015, 4:58:43 AM2/24/15
this appear on console when trying to add same primary key 

710 [main] WARN org.sql2o.logging.SysOutLogger - Could not roll back transaction. message: {}
com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException: Can't call rollback when autocommit=true
at com.mysql.jdbc.SQLError.createSQLException(
at com.mysql.jdbc.Connection.rollback(
at org.sql2o.Connection.rollback(
at org.sql2o.Connection.onException(
at org.sql2o.Query.executeUpdate(
at socialconnection.SConnection.registerUserToGroup(
at socialconnection.User.registerToGroup(
at network.Network.main(
BUILD SUCCESSFUL (total time: 1 second)

how to remove it?

Lars Aaberg

Mar 1, 2015, 10:14:53 AM3/1/15

Apparently sql2o calls the rollback method when an exception occurs. This in turn causes MySQL to throw another exception because it does not allow rollback to be called when autocommit is enabled. 

You could try to execute your statement in a transaction. This will cause autocommit to be disabled.

Lars Aaberg 

You received this message because you are subscribed to the Google Groups "sql2o" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
For more options, visit

Mike Sims

Mar 8, 2017, 11:24:49 AM3/8/17
to sql2o
For me, the 'auto increment' option was not set on the key field. Once I set it, it worked fine.
Reply all
Reply to author
0 new messages