5 Replies Latest reply on Jul 1, 2014 10:41 AM by Madhu Garimilla

    JBoss 6 with Oracle connection throws "Trying to return an unknown connection2!"  message

    Sam Tsang Newbie

      Hi I am using JBoss 6.0.0 Final as the application server.

      My project is a hybrid version of EJB 2 and JPA 2 with Hibernate implementation connected to a Oracle 10 g database.

       

      The deployment in JBoss 6.0.0 Final is fine and no error is displayed during deployment. But whenever I start to browse some pages that need to access the database, the server log will say:

       

      INFO  [org.jboss.resource.connectionmanager.TxConnectionManager] (http-0.0.0.0-443-2) throwable from unregister connection: java.lang.IllegalStateException: Trying to return an unknown connection2! org.jboss.resource.adapter.jdbc.jdk6.WrappedConnectionJDK6@13f1a39
          at org.jboss.resource.connectionmanager.CachedConnectionManager.unregisterConnection(CachedConnectionManager.java:330) [:6.0.0.Final]
          at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.connectionClosed(TxConnectionManager.java:787) [:6.0.0.Final]
          at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.closeHandle(BaseWrapperManagedConnection.java:364) [:6.0.0.Final]
          at org.jboss.resource.adapter.jdbc.WrappedConnection.close(WrappedConnection.java:165) [:6.0.0.Final]
          at org.springframework.jdbc.datasource.DataSourceUtils.doReleaseConnection(DataSourceUtils.java:333) [:3.0.5.RELEASE]

       

      It looks like an exception but it is in INFO threshold and I am able to browse the pages without any problem on the screen.

      I found no answer to this on the internet. What does this message mean? Is this harmful or indicating some problem with the connection?

        • 2. Re: JBoss 6 with Oracle connection throws "Trying to return an unknown connection2!"  message
          Sam Tsang Newbie

          Thanks but that only works in Hibernate 2. What is the solution in Hibernate 3.6? I really prefer using the upgraded version of that answer.

          • 3. Re: JBoss 6 with Oracle connection throws "Trying to return an unknown connection2!"  message
            jaikiran pai Master

            Sam Tsang wrote:

             

            What is the solution in Hibernate 3.6? I really prefer using the upgraded version of that answer.

            I have fixed the "other mechanism" link in that wiki. That should now give you an idea of what needs to be done for Hibernate 3.6

            • 5. Re: JBoss 6 with Oracle connection throws "Trying to return an unknown connection2!"  message
              Madhu Garimilla Newbie

              I am seeing the same issue with EAP 6.1 final +Teiid 8.7. I see this exception in my logs. Could you suggest the fix for this.

               

              01 Jul 2014 19:12:33,620 INFO  [org.jboss.jca.core.connectionmanager.listener.TxConnectionListener] (http-/0.0.0.0:8080-2) gYz9nTBWZGM4 IJ000311: Throwable from unregister connection: java.lang.IllegalStateException: Trying to return an unknown connection2! org.jboss.jca.adapters.jdbc.jdk6.WrappedConnectionJDK6@20c5cc7e

                  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.teiid.translator.jdbc.JDBCExecutionFactory.closeConnection(JDBCExecutionFactory.java:295)

                  at org.teiid.translator.jdbc.JDBCExecutionFactory.closeConnection(JDBCExecutionFactory.java:57)

                  at org.teiid.translator.BaseDelegatingExecutionFactory.closeConnection(BaseDelegatingExecutionFactory.java:85) [teiid-api-8.7.0.FinalCAFix-SNAPSHOT.jar:8.7.0.FinalCAFix-SNAPSHOT]

                  at com.ca.chorus.teiid.safety.SafetyHarnessExecutionFactory.closeConnection(SafetyHarnessExecutionFactory.java:80)

                  at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.close(ConnectorWorkItem.java:231)

                  at org.teiid.dqp.internal.process.DataTierTupleSource.fullyCloseSource(DataTierTupleSource.java:323)

                  at org.teiid.dqp.internal.process.DataTierTupleSource.closeSource(DataTierTupleSource.java:353)

                  at org.teiid.query.processor.relational.AccessNode.nextBatchDirect(AccessNode.java:390)

                  at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:278)

                  at org.teiid.query.processor.relational.UnionAllNode.nextBatchDirect(UnionAllNode.java:151)

                  at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:278)

                  at org.teiid.query.processor.relational.ProjectNode.nextBatchDirect(ProjectNode.java:146)

                  at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:278)

                  at org.teiid.query.processor.relational.UnionAllNode.nextBatchDirect(UnionAllNode.java:151)

                  at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:278)

                  at org.teiid.query.processor.BatchIterator.finalRow(BatchIterator.java:69)

                  at org.teiid.common.buffer.AbstractTupleSource.getCurrentTuple(AbstractTupleSource.java:70)

                  at org.teiid.query.processor.BatchIterator.getCurrentTuple(BatchIterator.java:84)

                  at org.teiid.common.buffer.AbstractTupleSource.nextTuple(AbstractTupleSource.java:48)

                  at org.teiid.query.processor.relational.SortUtility.initialSort(SortUtility.java:269)

                  at org.teiid.query.processor.relational.SortUtility.sort(SortUtility.java:202)

                  at org.teiid.query.processor.relational.SortNode.sortPhase(SortNode.java:112)

                  at org.teiid.query.processor.relational.SortNode.nextBatchDirect(SortNode.java:91)

                  at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:278)

                  at org.teiid.query.processor.relational.LimitNode.nextBatchDirect(LimitNode.java:102)

                  at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:278)

                  at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:136)

                  at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:151)

                  at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:114)

                  at org.teiid.query.processor.BatchIterator.finalRow(BatchIterator.java:69)

                  at org.teiid.common.buffer.AbstractTupleSource.getCurrentTuple(AbstractTupleSource.java:70)

                  at org.teiid.query.processor.BatchIterator.getCurrentTuple(BatchIterator.java:84)

                  at org.teiid.common.buffer.AbstractTupleSource.hasNext(AbstractTupleSource.java:92)

                  at org.teiid.query.processor.proc.ProcedurePlan.executePlan(ProcedurePlan.java:563)