"IJ031017: You cannot set autocommit during a managed transaction" using Spring with EclipseLink in JBoss EAP
Issue
- 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) ...
Environment
- Red Hat JBoss Enterprise Application Platform (EAP) 7
- Spring / EclipseLink
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.