SQLException: "Connection is not associated with a managed connection" on EntityManager close in EAP 6
Issue
Encountering an exception when closing an application managed entity manager
... ERROR [org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl] ... HHH000246: SQLException escaped proxy: java.sql.SQLException: Connection is not associated with a managed connection.org.jboss.jca.adapters.jdbc.jdk6.WrappedConnectionJDK6@567e2a30
at org.jboss.jca.adapters.jdbc.WrappedConnection.lock(WrappedConnection.java:155)
at org.jboss.jca.adapters.jdbc.WrappedStatement.lock(WrappedStatement.java:114)
at org.jboss.jca.adapters.jdbc.WrappedStatement.clearBatch(WrappedStatement.java:1037)
at org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl.releaseStatements(AbstractBatchImpl.java:163)
at org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl.release(AbstractBatchImpl.java:197)
at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.close(JdbcCoordinatorImpl.java:174)
at org.hibernate.engine.transaction.internal.TransactionCoordinatorImpl.close(TransactionCoordinatorImpl.java:277)
at org.hibernate.internal.SessionImpl.close(SessionImpl.java:354)
at org.hibernate.ejb.EntityManagerImpl.close(EntityManagerImpl.java:137)
...
Environment
- Red Hat JBoss Enterprise Application Platform (EAP) 6
- Hibernate 4
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.