1 Reply Latest reply: Jan 20, 2014 10:32 AM by Cdelahun-Oracle RSS

    using JBoss with EclipseLink getting IllegalStateException: Trying to return an unknown connection2

    user2326681

      We are using JBoss EAP 6.0.1 with EclipseLink 2.5.1 and are getting the following connection clean-up error:

      2014-01-08 12:26:06,095 INFO  [TxConnectionListener] (EJB default - 1) IJ000311: Throwable from unregister connection: java.lang.IllegalStateException: Trying to return an unknown connection2

      See JBoss forum link indicating it seems to be an EclipseLink problem: https://community.jboss.org/wiki/WhyDoIGetTryingToReturnAnUnknownConnection2


      Is there some needed EclipseLink configuration or bug related to this issue?


      Here's the relevant snippet:

      2014-01-08 12:26:06,095 INFO  [TxConnectionListener] (EJB default - 1) IJ000311: Throwable from unregister connection: java.lang.IllegalStateException: Trying to return an unknown connection2! org.jboss.jca.adapters.jdbc.jdk6.WrappedConnectionJDK6@7bf43ff6

        at org.jboss.jca.core.connectionmanager.ccm.CachedConnectionManagerImpl.unregisterConnection(CachedConnectionManagerImpl.java:347)

        at org.jboss.jca.core.connectionmanager.listener.TxConnectionListener.connectionClosed(TxConnectionListener.java:371)

        at org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnection.closeHandle(BaseWrapperManagedConnection.java:568)

        at org.jboss.jca.adapters.jdbc.WrappedConnection.close(WrappedConnection.java:264)

      at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.closeDatasourceConnection(DatabaseAccessor.java:493)

      at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.closeConnection(DatasourceAccessor.java:520)

      at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.closeConnection(DatabaseAccessor.java:518)

      at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.closeJTSConnection(DatasourceAccessor.java:187)

      at org.eclipse.persistence.sessions.server.ClientSession.releaseJTSConnection(ClientSession.java:160)

      at org.eclipse.persistence.transaction.AbstractSynchronizationListener.beforeCompletion(AbstractSynchronizationListener.java:175)

       

      Thanks,

      Mike

        • 1. Re: using JBoss with EclipseLink getting IllegalStateException: Trying to return an unknown connection2
          Cdelahun-Oracle

          I'm not sure why this is considered an EclipseLink problem, but feel free to file a bug for it if there is something in EclipseLink that should be changed.  The issue to me sounds as if the connection leak detection doesn't like that the application is obtaining a connection that is released in a beforeCompletion transaction callback.  The article you've linked seems to suggest these are spurious messages that can be turned off, and indeed, since the connection is being closed, it isn't indicating a real issue.  Since these are just warnings logged at the INFO level logging by JBoss, you can either disable the detection or choose not to log the messages within JBoss. 

           

          Best Regards,
          Chris