4 Replies Latest reply on Jul 27, 2016 4:46 AM by parrotola

    Teiid - Teradata

    parrotola Novice

      Hi everybody,

      I tried to connect Teiid 9.0 with Jboss 8.12 to Teradata Express 15.10.0.7 but it didn't work.

      I created a Generic JDBC Connection and I added table to my source model.

      I tried all Jdbc driver version.

      Thank you!

      When I executed the query on table I get this error:

       

      Starting run

      SELECT * FROM "tera13"."SQLJ.teiidtest"

      java.sql.SQLException: org.teiid.runtime.client.TeiidClientException: java.lang.RuntimeException: Remote org.teiid.core.TeiidProcessingException: TEIID30504 tera13: TEIID11009 java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:/tera13

       

      and This is my stacktrace:


      17:14:24,177 WARN  [org.jboss.jca.core.connectionmanager.pool.strategy.OnePool] (Worker5_QueryProcessorQueue16) BFMeGFe3W2uq IJ000604: Throwable while attempting to get a new connection: null: javax.resource.ResourceException: Could not create connection

        at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:359)

        at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:307)

        at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.createConnectionEventListener(SemaphoreArrayListManagedConnectionPool.java:834)

        at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.getConnection(SemaphoreArrayListManagedConnectionPool.java:379)

        at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getSimpleConnection(AbstractPool.java:453)

        at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getConnection(AbstractPool.java:425)

        at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:354)

        at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.getManagedConnection(TxConnectionManagerImpl.java:368)

        at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:510)

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

        at org.teiid.translator.jdbc.JDBCExecutionFactory.getConnection(JDBCExecutionFactory.java:267) [translator-jdbc-8.12.4.jar:8.12.4]

        at org.teiid.translator.jdbc.JDBCExecutionFactory.getConnection(JDBCExecutionFactory.java:68) [translator-jdbc-8.12.4.jar:8.12.4]

        at org.teiid.translator.ExecutionFactory.getConnection(ExecutionFactory.java:194) [teiid-api-8.12.4.jar:8.12.4]

        at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:320)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_71]

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_71]

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_71]

        at java.lang.reflect.Method.invoke(Method.java:497) [rt.jar:1.8.0_71]

        at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211)

        at com.sun.proxy.$Proxy47.execute(Unknown Source)

        at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306)

        at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112)

        at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108)

        at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_71]

        at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65)

        at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276)

        at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119)

        at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_71]

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_71]

        at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_71]

      Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.teradata.tdgss.jtdgss.TdgssManager

        at com.teradata.jdbc.jdbc.GenericTeraEncrypt.getTDgssVersion(GenericTeraEncrypt.java:583)

        at com.teradata.jdbc.jdbc_4.parcel.ClientConfigParcel.toStream(ClientConfigParcel.java:55)

        at com.teradata.jdbc.jdbc_4.io.TDPacket.addParcel(TDPacket.java:98)

        at com.teradata.jdbc.jdbc.GenericLogonController.run(GenericLogonController.java:95)

        at com.teradata.jdbc.jdbc_4.TDSession.<init>(TDSession.java:209)

        at com.teradata.jdbc.jdk6.JDK6_SQL_Connection.<init>(JDK6_SQL_Connection.java:35)

        at com.teradata.jdbc.jdk6.JDK6ConnectionFactory.constructSQLConnection(JDK6ConnectionFactory.java:25)

        at com.teradata.jdbc.jdbc.ConnectionFactory.createConnection(ConnectionFactory.java:179)

        at com.teradata.jdbc.jdbc.ConnectionFactory.createConnection(ConnectionFactory.java:169)

        at com.teradata.jdbc.TeraDriver.doConnect(TeraDriver.java:234)

        at com.teradata.jdbc.TeraDriver.connect(TeraDriver.java:160)

        at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:331)

        ... 30 more

       

       

      17:14:24,189 WARN  [org.teiid.CONNECTOR] (Worker5_QueryProcessorQueue16) BFMeGFe3W2uq Connector worker process failed for atomic-request=BFMeGFe3W2uq.4.1.3: org.teiid.translator.TranslatorException: TEIID11009 java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:/tera13

        at org.teiid.translator.jdbc.JDBCExecutionFactory.getConnection(JDBCExecutionFactory.java:271) [translator-jdbc-8.12.4.jar:8.12.4]

        at org.teiid.translator.jdbc.JDBCExecutionFactory.getConnection(JDBCExecutionFactory.java:68) [translator-jdbc-8.12.4.jar:8.12.4]

        at org.teiid.translator.ExecutionFactory.getConnection(ExecutionFactory.java:194) [teiid-api-8.12.4.jar:8.12.4]

        at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:320)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_71]

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_71]

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_71]

        at java.lang.reflect.Method.invoke(Method.java:497) [rt.jar:1.8.0_71]

        at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211)

        at com.sun.proxy.$Proxy47.execute(Unknown Source)

        at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306)

        at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112)

        at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108)

        at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_71]

        at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65)

        at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276)

        at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119)

        at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_71]

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_71]

        at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_71]

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

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

        at org.teiid.translator.jdbc.JDBCExecutionFactory.getConnection(JDBCExecutionFactory.java:267) [translator-jdbc-8.12.4.jar:8.12.4]

        ... 20 more

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

        at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:421)

        at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.getManagedConnection(TxConnectionManagerImpl.java:368)

        at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:510)

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

        ... 21 more

      Caused by: javax.resource.ResourceException: IJ000658: Unexpected throwable while trying to create a connection: null

        at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.getConnection(SemaphoreArrayListManagedConnectionPool.java:421)

        at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getSimpleConnection(AbstractPool.java:453)

        at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getConnection(AbstractPool.java:425)

        at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:354)

        ... 24 more

      Caused by: javax.resource.ResourceException: Could not create connection

        at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:359)

        at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:307)

        at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.createConnectionEventListener(SemaphoreArrayListManagedConnectionPool.java:834)

        at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.getConnection(SemaphoreArrayListManagedConnectionPool.java:379)

        ... 27 more

      Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.teradata.tdgss.jtdgss.TdgssManager

        at com.teradata.jdbc.jdbc.GenericTeraEncrypt.getTDgssVersion(GenericTeraEncrypt.java:583)

        at com.teradata.jdbc.jdbc_4.parcel.ClientConfigParcel.toStream(ClientConfigParcel.java:55)

        at com.teradata.jdbc.jdbc_4.io.TDPacket.addParcel(TDPacket.java:98)

        at com.teradata.jdbc.jdbc.GenericLogonController.run(GenericLogonController.java:95)

        at com.teradata.jdbc.jdbc_4.TDSession.<init>(TDSession.java:209)

        at com.teradata.jdbc.jdk6.JDK6_SQL_Connection.<init>(JDK6_SQL_Connection.java:35)

        at com.teradata.jdbc.jdk6.JDK6ConnectionFactory.constructSQLConnection(JDK6ConnectionFactory.java:25)

        at com.teradata.jdbc.jdbc.ConnectionFactory.createConnection(ConnectionFactory.java:179)

        at com.teradata.jdbc.jdbc.ConnectionFactory.createConnection(ConnectionFactory.java:169)

        at com.teradata.jdbc.TeraDriver.doConnect(TeraDriver.java:234)

        at com.teradata.jdbc.TeraDriver.connect(TeraDriver.java:160)

        at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:331)

        ... 30 more

       

       

      17:14:24,199 WARN  [org.teiid.PROCESSOR] (Worker4_QueryProcessorQueue17) BFMeGFe3W2uq TEIID30020 Processing exception for request BFMeGFe3W2uq.4 'TEIID30504 tera13: TEIID11009 java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:/tera13'. Originally TeiidProcessingException 'Could not initialize class com.teradata.tdgss.jtdgss.TdgssManager' GenericTeraEncrypt.java:583. Enable more detailed logging to see the entire stacktrace.

        • 1. Re: Teiid - Teradata
          Ramesh Reddy Master

          See the error "Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.teradata.tdgss.jtdgss.TdgssManager"

           

          Were there more than one JAR for the JDBC driver for Teradata?

          • 2. Re: Teiid - Teradata
            parrotola Novice

            Yes. I have

            terajdbc4.jar and tdgssconfig.jar and I put both in the configuration.

             

            Francesco

            • 3. Re: Teiid - Teradata
              Ramesh Reddy Master

              When there is more than single JAR, then deployment of the JDBC driver from Designer does not work correctly. What you would need to do create module based on both the jars in the server.

               

              On the server add a directory <your-eap-install>/modules/modules/system/layers/dv/com/teradata/main", and copy both terajdbc4.jar and tdgssconfig.jar into it.  Then add a file called "module.xml" with following content

               

              <?xml version="1.0" encoding="UTF-8"?>
              <module xmlns="urn:jboss:module:1.0" name="com.teradata">
                <resources>
                  <resource-root path="terajdbc4.jar"/>
                  <resource-root path="tdgssconfig.jar"/>
                </resources>
                <dependencies>
                  <module name="javax.api"/>
                </dependencies>
              </module>
              

               

              Now edit the " <your-eap-install>/standalone/configuration/standalone-teiid.xml" file, and add following under the "datasources" subsystem.

               

              <driver name="h2" module="com.teradata">
                <driver-class>com.teradata.jdbc.TeraDriver</driver-class>
              </driver>
              

               

              also add a datasource like

              <datasource jndi-name="java:/teraDS" pool-name="teraDS" enabled="true" use-java-context="true">
                  <connection-url>{**your-connection-url}</connection-url>
                  <driver>teradata</driver>
                  <security>
                      <user-name>{user}</user-name>
                      <password>{password}</password>
                  </security>
              </datasource>
              

               

               

              Then restart the server. Now, in designer, you would need to right click on the model and set to use "teraDS" as your data source in the Server. Then you can preview etc.

              • 4. Re: Teiid - Teradata
                parrotola Novice

                Thank you for all Ramesh!

                If you come in Italy, you are my guest!