1 2 Previous Next 19 Replies Latest reply on Oct 23, 2014 4:42 AM by Lukas Mro

    Connection error - result set closed

    Lukas Mro Newbie

      Hi Guys

      This is my firs post here, so - Hello all

       

      First of all, i would like to say how amaizing your work here is with Teiid and Teiid Designer.

      I manage to build quite complex raporting engine base on Teiidi and Jasper report, mostly i have solved

      probelems on my own, but currently it seems that i need to ask for your help.

       

      Basic data:

      - Virtual Host - WinSerwer 2008 R2 on 64 bits

      - 8 gb of Ram (but Teiidi Designer works on same machine so only 3gb can be used )

      - Teiid engin is connecting to FireBird DB or MS SQL DB, adding some data from dictionary DB and pushing them to VDB for Jasper presentation.

       

      Currently im facing some connections problem on Firebird connection when im trying to consolidate (marge) P&L Reports for all 6 companies.

      Basically this is just union query for each single P&L transofmation.

       

      It seems that this is tomuch (or to long) for Teiid engin and im reciving such error:

       

      09:09:54,697 WARN  [org.teiid.CONNECTOR] (Worker209_QueryProcessorQueue10300) KYQBB+907s97 Connector worker process failed for atomic-request=KYQBB+907s97.61.806.775: org.teiid.translator.TranslatorException: HY000 Unexpected exception while translating results: Result set is already closed.

          at org.teiid.translator.jdbc.JDBCQueryExecution.next(JDBCQueryExecution.java:108)

          at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.handleBatch(ConnectorWorkItem.java:316) [teiid-engine-8.3.0.Final.jar:8.3.0.Final]

          at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.more(ConnectorWorkItem.java:141) [teiid-engine-8.3.0.Final.jar:8.3.0.Final]

          at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:467) [teiid-engine-8.3.0.Final.jar:8.3.0.Final]

          at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:178) [teiid-engine-8.3.0.Final.jar:8.3.0.Final]

          at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:175) [teiid-engine-8.3.0.Final.jar:8.3.0.Final]

          at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) [rt.jar:1.6.0_45]

          at java.util.concurrent.FutureTask.run(Unknown Source) [rt.jar:1.6.0_45]

          at org.teiid.dqp.internal.process.DQPCore$FutureWork.run(DQPCore.java:120) [teiid-engine-8.3.0.Final.jar:8.3.0.Final]

          at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:264) [teiid-engine-8.3.0.Final.jar:8.3.0.Final]

          at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:123) [teiid-engine-8.3.0.Final.jar:8.3.0.Final]

          at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:298) [teiid-engine-8.3.0.Final.jar:8.3.0.Final]

          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) [rt.jar:1.6.0_45]

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.6.0_45]

          at java.lang.Thread.run(Unknown Source) [rt.jar:1.6.0_45]

      Caused by: org.firebirdsql.jdbc.FBSQLException: Result set is already closed.

          at org.firebirdsql.jdbc.FBStatementFetcher.checkClosed(FBStatementFetcher.java:232)

          at org.firebirdsql.jdbc.FBStatementFetcher.fetch(FBStatementFetcher.java:187)

          at org.firebirdsql.jdbc.FBStatementFetcher.next(FBStatementFetcher.java:137)

          at org.firebirdsql.jdbc.AbstractResultSet.next(AbstractResultSet.java:273)

          at org.jboss.jca.adapters.jdbc.WrappedResultSet.next(WrappedResultSet.java:1862)

          at org.teiid.translator.jdbc.JDBCQueryExecution.next(JDBCQueryExecution.java:95)

          ... 14 more

       

       

      What can i do with this..

      When im restarting server report works few times and then go down again.

      Other reports (single PLs) works with out problems (while this one wont)

      Seems like some kind of timeout.

       

      What other data (log) can i provide dispite this error log?

       

      Thanks for help and Your time.

      BR

        • 1. Re: Connection error - result set closed
          Ramesh Reddy Master

          Lukas,

           

          Welcome to Teiid forums. We always appreciate your feedback on Teiid.

           

          I see issue mentioned here https://groups.yahoo.com/neo/groups/Firebird-Java/conversations/topics/7674 as this occurs when used with auto-commit mode. Is this the only source you have in the VDB? How did you configure this data source?

           

          Ramesh..

          • 2. Re: Connection error - result set closed
            Lukas Mro Newbie

            Hi Ramesh

            Thanks for answer. I`m yours big fan (as im reading this forum from long time )

             

            - basically i have 6 companies, each one has own FB database, and I have another one dictionary database also on FB.

            So when I`m running 1 single report only one source DB is quered and one dictionary DB

            When im running consolidation report, its union of six single reports (view sets) so six source DB is quered and one dictionary.

             

            - Datasource is configured by teiid designer as JDBC Datasource and added to Teiid server trought Teiid Designer server view

            (add from source)

             

            - Im using only views in Teiid, im not sure how can set or change autocommit ?

            • 3. Re: Connection error - result set closed
              Ramesh Reddy Master

              Is there a XA driver for FireBird? One option is to use XA data source configuration in terms defining the data source in Server. Then you can control overall transaction scope across all the data sources.

               

              The issue is, Teiid does not use same connection over multiple statements like above link portrays, may be you can try setting "track-connection-by-tx" property to true, this true by default as defined here  https://access.redhat.com/documentation/en-US/JBoss_Enterprise_Web_Platform/5/html/Administration_And_Configuration_Guid… I would error on the side of the Firebird DB JDBC driver, check if they have any bug reports on this behavior

               

              I am not sure if there any additional tricks to use at individual sources. May be SteveH knows. Designer only can create "local" data sources, not sure what it sets "track-connection-by-tx" as.


              Ramesh..

              • 4. Re: Connection error - result set closed
                Lukas Mro Newbie

                Hi Ramesh, thanks for answer

                 

                Perhaps i should set some more detailed logging options? To have more informations about this error?

                How can i do it?

                • 5. Re: Connection error - result set closed
                  Ramesh Reddy Master

                  standalone-teiid.xml has logging section to enable logging at any level based on the context.

                  • 6. Re: Connection error - result set closed
                    Lukas Mro Newbie

                    Thats how it looks from teiid console

                     

                    16:18:21,534 INFO  [org.teiid.CONNECTOR] (Worker6_QueryProcessorQueue8) aFW8eG6VSLiM SimpleJDBCExecutionFactory Commit=true;DatabaseProductName=Firebird 2.5.WI;DatabaseProductVersion=WI-V2.5.2.26540;DriverMajorVersion=2;DriverMajorVersion=2;DriverName=Jaybird JCA/JDBC driver;DriverVersion=2.2;IsolationLevel=2

                    16:21:38,140 WARN  [org.teiid.CONNECTOR] (Worker11_QueryProcessorQueue1175) aFW8eG6VSLiM Connector worker process failed for atomic-request=aFW8eG6VSLiM.3.699.145: org.teiid.translator.TranslatorException: TEIID11009 java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:/OLAP_1

                        at org.teiid.translator.jdbc.JDBCExecutionFactory.getConnection(JDBCExecutionFactory.java:240)

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

                        at org.teiid.translator.ExecutionFactory.getConnection(ExecutionFactory.java:190) [teiid-api-8.3.0.Final.jar:8.3.0.Final]

                        at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:221) [teiid-engine-8.3.0.Final.jar:8.3.0.Final]

                        at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:464) [teiid-engine-8.3.0.Final.jar:8.3.0.Final]

                        at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:178) [teiid-engine-8.3.0.Final.jar:8.3.0.Final]

                        at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:175) [teiid-engine-8.3.0.Final.jar:8.3.0.Final]

                        at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) [rt.jar:1.6.0_45]

                        at java.util.concurrent.FutureTask.run(Unknown Source) [rt.jar:1.6.0_45]

                        at org.teiid.dqp.internal.process.DQPCore$FutureWork.run(DQPCore.java:120) [teiid-engine-8.3.0.Final.jar:8.3.0.Final]

                        at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:264) [teiid-engine-8.3.0.Final.jar:8.3.0.Final]

                        at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:123) [teiid-engine-8.3.0.Final.jar:8.3.0.Final]

                        at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:298) [teiid-engine-8.3.0.Final.jar:8.3.0.Final]

                        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) [rt.jar:1.6.0_45]

                        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.6.0_45]

                        at java.lang.Thread.run(Unknown Source) [rt.jar:1.6.0_45]

                    Caused by: java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:/OLAP_1

                        at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:137)

                        at org.teiid.translator.jdbc.JDBCExecutionFactory.getConnection(JDBCExecutionFactory.java:238)

                        ... 15 more

                    Caused by: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:/OLAP_1

                        at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:390) [ironjacamar-core-impl-1.0.9.Final.jar:1.0.9.Final]

                        at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.getManagedConnection(TxConnectionManagerImpl.java:368) [ironjacamar-core-impl-1.0.9.Final.jar:1.0.9.Final]

                        at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:464) [ironjacamar-core-impl-1.0.9.Final.jar:1.0.9.Final]

                        at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:129)

                        ... 16 more

                    Caused by: javax.resource.ResourceException: IJ000655: No managed connections available within configured blocking timeout (30000 [ms])

                        at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.getConnection(SemaphoreArrayListManagedConnectionPool.java:377) [ironjacamar-core-impl-1.0.9.Final.jar:1.0.9.Final]

                        at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getSimpleConnection(AbstractPool.java:397) [ironjacamar-core-impl-1.0.9.Final.jar:1.0.9.Final]

                        at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getConnection(AbstractPool.java:365) [ironjacamar-core-impl-1.0.9.Final.jar:1.0.9.Final]

                        at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:329) [ironjacamar-core-impl-1.0.9.Final.jar:1.0.9.Final]

                        ... 19 more

                     

                    16:21:38,173 WARN  [org.teiid.PROCESSOR] (Worker14_QueryProcessorQueue1200) aFW8eG6VSLiM TEIID30020 Processing exception 'TEIID30504 OLAP_1: TEIID11009 java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:/OLAP_1' for request aFW8eG6VSLiM.3.  Exception type org.teiid.core.TeiidProcessingException thrown from org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.getConnection(SemaphoreArrayListManagedConnectionPool.java:377). Enable more detailed logging to see the entire stacktrace.

                    16:21:38,183 WARN  [org.teiid.CONNECTOR] (Worker17_QueryProcessorQueue1179) aFW8eG6VSLiM Connector worker process failed for atomic-request=aFW8eG6VSLiM.3.710.147: org.teiid.translator.TranslatorException: HY000 Unexpected exception while translating results: Result set is already closed.

                        at org.teiid.translator.jdbc.JDBCQueryExecution.next(JDBCQueryExecution.java:108)

                        at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.handleBatch(ConnectorWorkItem.java:316) [teiid-engine-8.3.0.Final.jar:8.3.0.Final]

                        at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.more(ConnectorWorkItem.java:141) [teiid-engine-8.3.0.Final.jar:8.3.0.Final]

                        at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:467) [teiid-engine-8.3.0.Final.jar:8.3.0.Final]

                        at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:178) [teiid-engine-8.3.0.Final.jar:8.3.0.Final]

                        at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:175) [teiid-engine-8.3.0.Final.jar:8.3.0.Final]

                        at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) [rt.jar:1.6.0_45]

                        at java.util.concurrent.FutureTask.run(Unknown Source) [rt.jar:1.6.0_45]

                        at org.teiid.dqp.internal.process.DQPCore$FutureWork.run(DQPCore.java:120) [teiid-engine-8.3.0.Final.jar:8.3.0.Final]

                        at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:264) [teiid-engine-8.3.0.Final.jar:8.3.0.Final]

                        at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:123) [teiid-engine-8.3.0.Final.jar:8.3.0.Final]

                        at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:298) [teiid-engine-8.3.0.Final.jar:8.3.0.Final]

                        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) [rt.jar:1.6.0_45]

                        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.6.0_45]

                        at java.lang.Thread.run(Unknown Source) [rt.jar:1.6.0_45]

                    Caused by: org.firebirdsql.jdbc.FBSQLException: Result set is already closed.

                        at org.firebirdsql.jdbc.FBStatementFetcher.checkClosed(FBStatementFetcher.java:232)

                        at org.firebirdsql.jdbc.FBStatementFetcher.fetch(FBStatementFetcher.java:187)

                        at org.firebirdsql.jdbc.FBStatementFetcher.next(FBStatementFetcher.java:137)

                        at org.firebirdsql.jdbc.AbstractResultSet.next(AbstractResultSet.java:273)

                        at org.jboss.jca.adapters.jdbc.WrappedResultSet.next(WrappedResultSet.java:1862)

                        at org.teiid.translator.jdbc.JDBCQueryExecution.next(JDBCQueryExecution.java:95)

                        ... 14 more

                     

                    16:21:38,301 WARN  [org.teiid.CONNECTOR] (Worker9_QueryProcessorQueue1199) aFW8eG6VSLiM Connector worker process failed for atomic-request=aFW8eG6VSLiM.3.794.154: org.teiid.translator.TranslatorException: HY000 Unexpected exception while translating results: Result set is already closed.

                        at org.teiid.translator.jdbc.JDBCQueryExecution.next(JDBCQueryExecution.java:108)

                        at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.handleBatch(ConnectorWorkItem.java:316) [teiid-engine-8.3.0.Final.jar:8.3.0.Final]

                        at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.more(ConnectorWorkItem.java:141) [teiid-engine-8.3.0.Final.jar:8.3.0.Final]

                        at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:467) [teiid-engine-8.3.0.Final.jar:8.3.0.Final]

                        at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:178) [teiid-engine-8.3.0.Final.jar:8.3.0.Final]

                        at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:175) [teiid-engine-8.3.0.Final.jar:8.3.0.Final]

                        at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) [rt.jar:1.6.0_45]

                        at java.util.concurrent.FutureTask.run(Unknown Source) [rt.jar:1.6.0_45]

                        at org.teiid.dqp.internal.process.DQPCore$FutureWork.run(DQPCore.java:120) [teiid-engine-8.3.0.Final.jar:8.3.0.Final]

                        at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:264) [teiid-engine-8.3.0.Final.jar:8.3.0.Final]

                        at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:123) [teiid-engine-8.3.0.Final.jar:8.3.0.Final]

                        at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:298) [teiid-engine-8.3.0.Final.jar:8.3.0.Final]

                        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) [rt.jar:1.6.0_45]

                        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.6.0_45]

                        at java.lang.Thread.run(Unknown Source) [rt.jar:1.6.0_45]

                    Caused by: org.firebirdsql.jdbc.FBSQLException: Result set is already closed.

                        at org.firebirdsql.jdbc.FBStatementFetcher.checkClosed(FBStatementFetcher.java:232)

                        at org.firebirdsql.jdbc.FBStatementFetcher.fetch(FBStatementFetcher.java:187)

                        at org.firebirdsql.jdbc.FBStatementFetcher.next(FBStatementFetcher.java:137)

                        at org.firebirdsql.jdbc.AbstractResultSet.next(AbstractResultSet.java:273)

                        at org.jboss.jca.adapters.jdbc.WrappedResultSet.next(WrappedResultSet.java:1862)

                        at org.teiid.translator.jdbc.JDBCQueryExecution.next(JDBCQueryExecution.java:95)

                        ... 14 more

                    • 7. Re: Connection error - result set closed
                      Lukas Mro Newbie

                      Hi Guys,

                      Any new ideas?

                      • 8. Re: Connection error - result set closed
                        Steven Hawkins Master

                        The no managed connections available exception should indicate that the pool has been exhausted and a request for a connection has timed out.  Do you expect that given the load you are putting on the database?

                        • 9. Re: Connection error - result set closed
                          Ramesh Reddy Master

                          Have you tried my suggestion from above? As I was indicating Teiid does not issue multiple statements on single statement as the Firebird driver guys indicate, so I suspect the error is in the driver implementation. Check for newer versions of the driver or may be available. Also are you using any blobs or clobs in your request?

                          • 10. Re: Connection error - result set closed
                            Lukas Mro Newbie

                            Hi Guys, first - thanks for answers

                            I have changed driver for newest version 2.2.5

                            No changes

                             

                             

                            @Steven - i think its not a problem from database side, i can run this report for shorter period and it works, problems starts when im setting report for September , so this is amout of data problem.

                            ( im mean there is so much data to work with, that befor some part of query is finish and in second step for example dictionary db should be query the connection to this database is already closed.

                             

                            @Ramesh - Perhaps i just should create some more effective datasource from teiid enginelevel, not by coping ds trought designer?

                            But im not sure how to do this....

                            I didn`t find some step by step manual . Perhaps some JNDI type ds? I`m not sure where to put <track-connection-by-tx> tags...

                             

                            17:49:46,874 INFO  [org.teiid.CONNECTOR] (Worker3_QueryProcessorQueue7) OO+GV/YLiZD+ SimpleJDBCExecutionFactory Commit=true;DatabaseProductName=Firebird 2.5/LI;DatabaseProductVersion=LI-V2.5.1.26351;DriverMajorVersion=2;DriverMajorVersion=2;DriverName=Jaybird JCA/JDBC driver;DriverVersion=2.2;IsolationLevel=2

                            17:49:59,032 WARN  [org.teiid.CONNECTOR] (Worker2_QueryProcessorQueue153) OO+GV/YLiZD+ Connector worker process failed for atomic-request=OO+GV/YLiZD+.1.363.64: org.teiid.translator.TranslatorException: HY000 Unexpected exception while translating results: Result set is already closed.

                                at org.teiid.translator.jdbc.JDBCQueryExecution.next(JDBCQueryExecution.java:108)

                                at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.handleBatch(ConnectorWorkItem.java:316) [teiid-engine-8.3.0.Final.jar:8.3.0.Final]

                                at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.more(ConnectorWorkItem.java:141) [teiid-engine-8.3.0.Final.jar:8.3.0.Final]

                                at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:467) [teiid-engine-8.3.0.Final.jar:8.3.0.Final]

                                at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:178) [teiid-engine-8.3.0.Final.jar:8.3.0.Final]

                                at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:175) [teiid-engine-8.3.0.Final.jar:8.3.0.Final]

                                at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) [rt.jar:1.6.0_45]

                                at java.util.concurrent.FutureTask.run(Unknown Source) [rt.jar:1.6.0_45]

                                at org.teiid.dqp.internal.process.DQPCore$FutureWork.run(DQPCore.java:120) [teiid-engine-8.3.0.Final.jar:8.3.0.Final]

                                at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:264) [teiid-engine-8.3.0.Final.jar:8.3.0.Final]

                                at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:123) [teiid-engine-8.3.0.Final.jar:8.3.0.Final]

                                at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:298) [teiid-engine-8.3.0.Final.jar:8.3.0.Final]

                                at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) [rt.jar:1.6.0_45]

                                at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.6.0_45]

                                at java.lang.Thread.run(Unknown Source) [rt.jar:1.6.0_45]

                            Caused by: org.firebirdsql.jdbc.FBSQLException: Result set is already closed.

                                at org.firebirdsql.jdbc.FBStatementFetcher.checkClosed(FBStatementFetcher.java:232)

                                at org.firebirdsql.jdbc.FBStatementFetcher.fetch(FBStatementFetcher.java:187)

                                at org.firebirdsql.jdbc.FBStatementFetcher.next(FBStatementFetcher.java:137)

                                at org.firebirdsql.jdbc.AbstractResultSet.next(AbstractResultSet.java:273)

                                at org.jboss.jca.adapters.jdbc.WrappedResultSet.next(WrappedResultSet.java:1862)

                                at org.teiid.translator.jdbc.JDBCQueryExecution.next(JDBCQueryExecution.java:95)

                                ... 14 more

                             

                            17:49:59,035 WARN  [org.teiid.CONNECTOR] (Worker4_QueryProcessorQueue156) OO+GV/YLiZD+ Connector worker process failed for atomic-request=OO+GV/YLiZD+.1.365.65: org.teiid.translator.TranslatorException: HY000 Unexpected exception while translating results: Result set is already closed.

                                at org.teiid.translator.jdbc.JDBCQueryExecution.next(JDBCQueryExecution.java:108)

                                at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.handleBatch(ConnectorWorkItem.java:316) [teiid-engine-8.3.0.Final.jar:8.3.0.Final]

                                at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.more(ConnectorWorkItem.java:141) [teiid-engine-8.3.0.Final.jar:8.3.0.Final]

                                at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:467) [teiid-engine-8.3.0.Final.jar:8.3.0.Final]

                                at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:178) [teiid-engine-8.3.0.Final.jar:8.3.0.Final]

                                at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:175) [teiid-engine-8.3.0.Final.jar:8.3.0.Final]

                                at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) [rt.jar:1.6.0_45]

                                at java.util.concurrent.FutureTask.run(Unknown Source) [rt.jar:1.6.0_45]

                                at org.teiid.dqp.internal.process.DQPCore$FutureWork.run(DQPCore.java:120) [teiid-engine-8.3.0.Final.jar:8.3.0.Final]

                                at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:264) [teiid-engine-8.3.0.Final.jar:8.3.0.Final]

                                at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:123) [teiid-engine-8.3.0.Final.jar:8.3.0.Final]

                                at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:298) [teiid-engine-8.3.0.Final.jar:8.3.0.Final]

                                at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) [rt.jar:1.6.0_45]

                                at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.6.0_45]

                                at java.lang.Thread.run(Unknown Source) [rt.jar:1.6.0_45]

                            Caused by: org.firebirdsql.jdbc.FBSQLException: Result set is already closed.

                                at org.firebirdsql.jdbc.FBStatementFetcher.checkClosed(FBStatementFetcher.java:232)

                                at org.firebirdsql.jdbc.FBStatementFetcher.fetch(FBStatementFetcher.java:187)

                                at org.firebirdsql.jdbc.FBStatementFetcher.next(FBStatementFetcher.java:137)

                                at org.firebirdsql.jdbc.AbstractResultSet.next(AbstractResultSet.java:273)

                                at org.jboss.jca.adapters.jdbc.WrappedResultSet.next(WrappedResultSet.java:1862)

                                at org.teiid.translator.jdbc.JDBCQueryExecution.next(JDBCQueryExecution.java:95)

                                ... 14 more

                            • 11. Re: Connection error - result set closed
                              Ramesh Reddy Master

                              Open "standalone-teiid.xml" file under "datasources" subsystem you should see the configuration that has been created through Designer.

                              • 12. Re: Connection error - result set closed
                                Steven Hawkins Master

                                It would also be good to repeat your scenario on a later release, ideally 8.9 CR1 to ensure that an older issue is not still in play.

                                • 13. Re: Connection error - result set closed
                                  Lukas Mro Newbie

                                  Hi Guys

                                  @Steven - unfortunately, at this moment i have only production environment , i cannot update now to newer release.

                                  @Ramesh - i cant set this parameter in current datasource configuration - its jdbc and does not support track-connection-by-tx tag

                                  My current DS config seems like:

                                   

                                  <datasource jndi-name="java:/AAA_1" pool-name="AAA_1" enabled="true">

                                    <connection-url>jdbc:firebirdsql://192.168.1.1:3050//DATA/DATA.FDB?encoding=UTF8;type=TYPE4

                                    </connection-url>

                                  <driver>jaybird-2.2.5.jar</driver>

                                  <security>

                                  <user-name>LOGIN</user-name>

                                  <password>PASSWORD</password>

                                  </security>

                                  </datasource>

                                   

                                  Would you please help me to make XA connection? I didn`t succeed on my own...

                                  • 14. Re: Re: Connection error - result set closed
                                    Ramesh Reddy Master

                                    A sample XA for Oracle looks like below

                                     

                                    <!-- Add the below contents under "datasources" subsystem in the standalone-teiid.xml or deploy as -ds.xml file -->
                                    <datasources>
                                        <xa-datasource jndi-name="java:/OracleDS" pool-name="OracleDS" enabled="true" use-java-context="true" use-ccm="true">
                                            <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
                                            <xa-datasource-property name="URL">jdbc:oracle:thin:{host}:1521:orcl</xa-datasource-property>
                                            <driver>ojdbc6.jar</driver>
                                            
                                            <xa-pool>
                                                <min-pool-size>10</min-pool-size>
                                                <max-pool-size>20</max-pool-size>
                                                <is-same-rm-override>true</is-same-rm-override>
                                                <prefill>false</prefill>
                                                <use-strict-min>false</use-strict-min>
                                                <flush-strategy>FailingConnectionOnly</flush-strategy>
                                                <no-tx-separate-pools/>
                                            </xa-pool>
                                    
                                            <security>
                                                <user-name>{user}</user-name>
                                                <password>{password}</password>
                                            </security>         
                                        </xa-datasource>                
                                    </datasources>
                                    

                                     

                                    But you need to find out if FireBird has a XA compatible JDBC datasource? then follow the above template.

                                     

                                    BTW,  TRACE level logging can help find out if Teiid indeed issuing the query after the resultset is closed, if that the case we can open up an issue and fix the problem.

                                     

                                    Ramesh..

                                    1 2 Previous Next