3 Replies Latest reply on Jan 10, 2018 11:53 AM by Ramesh Reddy

    Issue with REST web service for specific calls (TEIID30151)

    Andreas Krück Newbie

      Hi all,

       

      I'm using an existing Teiid 10 instance to retrieve data using automatically created statements from an Oracle database and a REST web service. Based on the created query, it works or creates this error message:

      TEIID30020 Processing exception for request XOEEB85RAoHm.10 'TEIID30151 Error building Source for context item.'. Originally TeiidProcessingException XMLSystemFunctions.java:911.: org.teiid.core.TeiidProcessingException: TEIID30151 Error building Source for context item.

       

      This is a sample SQL producing this error (key SQL marked in red):

       

      SELECT MY_SCHEMA.ID,

        MY_REST.FILE_ID,

        MY_REST.FILE_NAME

      FROM ORACLE_DB.SCHEMA MY_SCHEMA

      LEFT OUTER JOIN REST_WS.WS_VIEW MY_REST ON MY_SCHEMA.ID = MY_REST.SEARCH_STRING

      WHERE MY_SCHEMA.ID IN (

        SELECT MY_SCHEMA.ID

        FROM ORACLE_DB.SCHEMA MY_SCHEMA

        INNER JOIN ORACLE_DB.SCHEMA2

        ON MY_SCHEMA.ID = ORACLE_DB.SCHEMA2.ID_FK

        INNER JOIN ORACLE_DB.SCHEMA3 MY_SCHEMA3

        ON ORACLE_DB.SCHEMA2.ID_FK = MY_SCHEMA3.BIA_SID

        WHERE MY_SCHEMA3.ID = 'ABC' AND ORACLE_DB.SCHEMA2.ID_FK = 12345

      )

      OPTION MAKEDEP REST_WS.WS_VIEW

       

      This is the same statement with a pre-defined key and this produces no errors:

       

      SELECT MY_SCHEMA.ID,

        MY_REST.FILE_ID,

        MY_REST.FILE_NAME

      FROM ORACLE_DB.SCHEMA MY_SCHEMA

      LEFT OUTER JOIN REST_WS.WS_VIEW MY_REST ON MY_SCHEMA.ID = MY_REST.SEARCH_STRING

      WHERE MY_SCHEMA.ID IN (56789)

      OPTION MAKEDEP REST_WS.WS_VIEW

       

      What can I do to find the origin of this error?

       

      Many thanks in advance.