"IJ031017: You cannot set autocommit during a managed transaction" using Spring with EclipseLink in JBoss EAP

Solution Verified - Updated -


  • Using Spring JPATransactionManager with EclipseLink with JBoss managed JTA datasource
  • Encountering the error below

    ... java.sql.SQLException: IJ031017: You cannot set autocommit during a managed transaction
        at org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnection.setJdbcAutoCommit(BaseWrapperManagedConnection.java:973)
        at org.jboss.jca.adapters.jdbc.WrappedConnection.setAutoCommit(WrappedConnection.java:787)
        at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicBeginTransaction(DatabaseAccessor.java:238)


  • Red Hat JBoss Enterprise Application Platform (EAP) 7
  • Spring / EclipseLink

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In