Can't call rollback when autocommit=true [InnoDB]

#1

i’m having a strange problem with jboss + hibernate + mysql (InnoDB table)

Sometimes (it’s not predictable) it gives:

com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Can’t call rollback when autocommit=true

org.jboss.jca.core.spi.transaction.local.LocalResourceException: Can’t call rollback when autocommit=true

even if in my hibernate.cfg.xml i have:

<property name=“hibernate.connection.autocommit”>false</property>

How is that possible?

0 Likes

#2

In the stacktrace there is:

07:38:40,019 WARN [org.jboss.jca.core.connectionmanager.TxConnectionManager] (HTTP-1854) IJ000401: Error during tidy up connection: org.jboss.jca.core.connectionmanager.listener.TxConnectionListener@2138e44e[state=DESTROYED managed connection=org.jboss.jca.adapters.jdbc.local.LocalManagedConnection@2e118f82 connection handles=0 lastUse=1552973737275 trackByTx=false pool=org.jboss.jca.core.connectionmanager.pool.strategy.OnePool@4c2b3265 pool internal context=SemaphoreArrayListManagedConnectionPool@14d6dde7[pool=ApplicationDS] xaResource=LocalXAResourceImpl@54bacd22[connectionListener=2138e44e connectionManager=23c9f8e2 warned=false currentXid=null productName=MySQL productVersion=5.6.10-log jndiName=java:/ApplicationDS] txSync=null]: org.jboss.jca.core.spi.transaction.local.LocalResourceException: Can’t call rollback when autocommit=true

0 Likes

#3

Is it possible that concurrent session read from an unpredictable state table?

Example:
HTTP REQUEST 01 Session 1 -> Write on table_A, Session 1 is not closed
HTTP REQUEST 02 Session 2 -> Read on table_A
for some reason operation done by Session 1 is rolled back
HTTP REQUEST 02 Session 2 -> Gives the warn ?

Can you please help ?

0 Likes

#4

Can you please help ?

0 Likes

#5

No one can give any hints ?

0 Likes

#6

Still no one with any idea ?

0 Likes