IJ000311 / "IJ000152: Trying to return an unknown connection" warnings after using Hibernate Session.connection() in JBoss EAP

Solution Verified - Updated -

Issue

  • Application code is using the Session.connection() API to work with the connection used by Hibernate during a transaction
  • At the end of some transactions, a WARN is written to the JBoss EAP server.log

    ... IJ000311: Throwable from unregister connection: java.lang.IllegalStateException: IJ000152: Trying to return an unknown connection: org.jboss.jca.adapters.jdbc.jdk8.WrappedConnectionJDK8...
    

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP) 7
  • Hibernate 5

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content