Uploaded image for project: 'Teiid Designer'
  1. Teiid Designer
  2. TEIIDDES-1502

Failure to access Oracle data source with column names enclosed in double quotes

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Minor
    • 8.2
    • 7.7
    • Import/Export
    • None
    • Hide

      1. create table and views as shown below in Oracle database

      create table test(recno  number,   ref_no varchar2(4000));
      create or replace view test_v as select recno as "Rec_Item_Number",   ref_no as "bom_ref_no." from test;
      

      2. Import test_v data source view into JBoss developer studio
      3. deploy and run the query against test_v.

      Show
      1. create table and views as shown below in Oracle database create table test(recno number, ref_no varchar2(4000)); create or replace view test_v as select recno as "Rec_Item_Number" , ref_no as "bom_ref_no." from test; 2. Import test_v data source view into JBoss developer studio 3. deploy and run the query against test_v.
    • Workaround Exists
    • Hide

      This would be handled the same as a SQL reserved word, in your model for Test_v, the Name in Source property for both columns should be enclosed in double quotes.

      Show
      This would be handled the same as a SQL reserved word, in your model for Test_v, the Name in Source property for both columns should be enclosed in double quotes.

    Description

      EDS is throwing an error when accessing Oracle data source with column names enclosed in double quotes. I am able to import the metadata, test through Datasource explorer but when I run the query against VDB, it is not interpreting correctly to send double-quotes to the column name in this case, causing below error.

      java.sql.SQLSyntaxErrorException: ORA-00922: missing or invalid option
      
      	at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:445)
      	at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
      	at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:879)
      	at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:450)
      	at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:192)
      	at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531)
      	at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:193)
      	at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:1033)
      	at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1329)
      	at oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:1909)
      	at oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:1871)
      	at oracle.jdbc.driver.OracleStatementWrapper.execute(OracleStatementWrapper.java:318)
      	at org.jboss.resource.adapter.jdbc.CheckValidConnectionSQL.isValidConnection(CheckValidConnectionSQL.java:58)
      	at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnectionFactory.isValidConnection(BaseWrapperManagedConnectionFactory.java:560)
      	at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.checkValid(BaseWrapperManagedConnection.java:364)
      	at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.matchManagedConnections(LocalManagedConnectionFactory.java:402)
      	at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:225)
      	at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:689)
      	at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:404)
      	at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:424)
      	at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:496)
      	at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941)
      	at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)
      	at org.teiid.translator.jdbc.JDBCExecutionFactory.getConnection(JDBCExecutionFactory.java:228)
      	at org.teiid.translator.jdbc.JDBCExecutionFactory.getConnection(JDBCExecutionFactory.java:56)
      	at org.teiid.translator.ExecutionFactory.getConnection(ExecutionFactory.java:184)
      	at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:207)
      	at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:354)
      	at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:143)
      	at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:140)
      	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      	at org.teiid.dqp.internal.process.DQPCore$FutureWork.run(DQPCore.java:120)
      	at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:240)
      	at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:122)
      	at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:292)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      

      JDBC Importer should be identify this scenario and automatically enclose in double quotes, instead of we manually add double-quotes for these type of scenarios.

      Attachments

        Activity

          People

            mdrillin1@redhat.com Mark Drilling (Inactive)
            rhn-support-hokuda Hisanobu Okuda
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: