2 Replies Latest reply on Jul 17, 2017 9:32 AM by Ruud Fleskens

    ORA-00904: invalid identifier

    Ruud Fleskens Newbie

      Hi community,

       

      I'm trying to create a simple REST procedure service for retrieving address information.

      I imported an Oracle 12c source and created a table view with a simple select * from view.


      When i tested the table in squirrel, it says 'failed to execute' and it passes me the error below. I've seen some posts about this, but no real answer to this. What is the reason for this?

      There is no logic in the tablefields, it always passes the last column in the 00904 error.

       

      Im using version 6.2

       

      Caused by: org.teiid.core.TeiidProcessingException: TEIID30504 Remote org.teiid.core.TeiidProcessingException: TEIID30504 BAG09A: 904 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: SELECT c_0, c_1, c_2, c_3, c_4, c_5, c_6, c_7, c_8, c_9, c_10, c_11 FROM (SELECT g_0."postcode" AS c_0, g_0."straatnaam_nen" AS c_1, g_0."straatnaam_off" AS c_2, g_0."straatnaam_tnt" AS c_3, g_0."woonplaats_tnt" AS c_4, g_0."woonplaats_nen" AS c_5, g_0."straatnaam_extract" AS c_6, g_0."huisnummer" AS c_7, g_0."huisnummertoevoeging" AS c_8, g_0."gemeentecode" AS c_9, g_0."gemeentenaam" AS c_10, g_0."provinciecode" AS c_11 FROM "BAG_OWNER"."ADRESSEN_CENDRIS" g_0) WHERE ROWNUM <= 500]

          at org.teiid.dqp.internal.process.DataTierTupleSource.exceptionOccurred(DataTierTupleSource.java:381)

          at org.teiid.dqp.internal.process.DataTierTupleSource.nextTuple(DataTierTupleSource.java:154)

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

          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.BatchCollector.collectTuples(BatchCollector.java:159)

          at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:141)

          at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:444)

          at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:326)

          at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51)

          at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:254)

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

          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)

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

          at java.lang.Thread.run(Thread.java:745)

      Caused by: org.teiid.core.TeiidException: 904 Remote org.teiid.translator.jdbc.JDBCExecutionException: 904 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: SELECT c_0, c_1, c_2, c_3, c_4, c_5, c_6, c_7, c_8, c_9, c_10, c_11 FROM (SELECT g_0."postcode" AS c_0, g_0."straatnaam_nen" AS c_1, g_0."straatnaam_off" AS c_2, g_0."straatnaam_tnt" AS c_3, g_0."woonplaats_tnt" AS c_4, g_0."woonplaats_nen" AS c_5, g_0."straatnaam_extract" AS c_6, g_0."huisnummer" AS c_7, g_0."huisnummertoevoeging" AS c_8, g_0."gemeentecode" AS c_9, g_0."gemeentenaam" AS c_10, g_0."provinciecode" AS c_11 FROM "BAG_OWNER"."ADRESSEN_CENDRIS" g_0) WHERE ROWNUM <= 500]

          at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:131)

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

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

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

          at java.util.concurrent.FutureTask.run(FutureTask.java:266)

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

          ... 6 more

      Caused by: java.sql.SQLSyntaxErrorException: Remote java.sql.SQLSyntaxErrorException: ORA-00904: "G_0"."provinciecode": invalid identifier

          at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:450)

          at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:399)

          at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1017)

          at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:655)

          at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:249)

          at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:566)

          at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:215)

          at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:58)

          at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:776)

          at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:897)

          at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1034)

          at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3820)

          at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3867)

          at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1502)

          at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:462)

          at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:123)

          ... 12 more