java.sql.SQLException: Can't call commit when autocommit=true

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,
Expert tip

MySQL doesn't support some types of characters (such as emojis) with the utf8 encoding. You need to be on MySQL 5.5+ and force utf8mb4 (everywhere, client and server). You can do this sending the query "SET NAMES utf8mb4". Check this https://goo.gl/3E2qzg

Solutions on the web

via ha-jdbc by qiwenmin
, 1 year ago
Can't call commit when autocommit=true
via jackrabbit-users by Dominique Pfister, 1 year ago
Can't call commit when autocommit=true
via jackrabbit-users by dainius rygelis, 1 year ago
Can't call commit when autocommit=true
via jackrabbit-users by dainius rygelis, 1 year ago
Can't call commit when autocommit=true
via Stack Overflow by Jesus Schneider
, 2 years ago
Can't call commit when autocommit=true
via GitHub by krillr
, 2 years ago
Can't call commit when autocommit=true
java.sql.SQLException: Can't call commit when autocommit=true
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:914)
at com.mysql.jdbc.Connection.commit(Connection.java:2274)
at sun.reflect.GeneratedMethodAccessor19.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at net.sf.hajdbc.util.reflect.Methods.invoke(Methods.java:47)
at net.sf.hajdbc.sql.AbstractInvocationHandler$SimpleInvoker.invoke(AbstractInvocationHandler.java:518)
at net.sf.hajdbc.sql.DatabaseWriteInvocationStrategy$1.call(DatabaseWriteInvocationStrategy.java:94)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
at java.util.concurrent.FutureTask.run(FutureTask.java:123)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)

Users with the same issue

4 times, 5 hours ago
16 times, 4 days ago
Once, 6 days ago
Once, 1 week ago
116 times, 1 week ago
164 more bugmates

Know the solutions? Share your knowledge to help other developers to debug faster.