"Connection is not associated with a managed connection" and "result set is closed" errors with Spring + Hibernate in EAP 6
Issue
- Using nested queries (e.g. Hibernate query during a
JdbcTemplatequery OR nested Hibernate queries) - Using
org.springframework.orm.jpa.JpaTransactionManagerfor the transaction manager - Outer queries fail with exceptions such as the following:
java.sql.SQLException: Connection is not associated with a managed connection.org.jboss.jca.adapters.jdbc.jdk6.WrappedConnectionJDK6
java.sql.SQLException: The result set is closed.
Environment
- Red Hat JBoss Enterprise Application Platform (EAP) 6
- Hibernate 4
- Spring
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
