Uploaded image for project: 'Teiid'
  1. Teiid
  2. TEIID-5294

Bug with the name correction logic (TEIID30151 eror)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 10.3, 10.1.3, 10.0.5, 10.2.1
    • 10.1.2
    • VDB
    • None
    • Hide

      Create teiid VDB containing 1 Oracle source and 1 REST service source. Define REST service like this:

      CREATE VIRTUAL PROCEDURE WS_PROCEDURE(SEARCH_INPUT varchar) RETURNS (
      FILE_ID varchar,
      FILE_NAME string
      )
      AS
      SELECT
      A.FILE_ID, A.FILE_NAME
      FROM
      (
      EXEC MY_WS.INVOKEHTTP(
      ...
      )
      ) AS F,
      XMLTABLE(
      '/myxml/response/docs' PASSING JSONTOXML('myxml', F.RESULT) COLUMNS
      FILE_ID string PATH 'fileid',
      FILE_NAME string PATH 'filename'
      )
      AS A;

      CREATE VIEW WS_VIEW AS SELECT * FROM REST_WS.WS_PROCEDURE;

      Show
      Create teiid VDB containing 1 Oracle source and 1 REST service source. Define REST service like this: CREATE VIRTUAL PROCEDURE WS_PROCEDURE(SEARCH_INPUT varchar) RETURNS ( FILE_ID varchar, FILE_NAME string ) AS SELECT A.FILE_ID, A.FILE_NAME FROM ( EXEC MY_WS.INVOKEHTTP( ... ) ) AS F, XMLTABLE( '/myxml/response/docs' PASSING JSONTOXML('myxml', F.RESULT) COLUMNS FILE_ID string PATH 'fileid', FILE_NAME string PATH 'filename' ) AS A; CREATE VIEW WS_VIEW AS SELECT * FROM REST_WS.WS_PROCEDURE;

      Error message "TEIID30151 Error building Source for context item" when calling SQL statement on VDB connected to REST service:

      13:13:24,572 WARN [org.teiid.PROCESSOR] (Worker1_QueryProcessorQueue1728) TEIID30020 Processing exception for request ikch7WEdCSyt.10 'TEIID30151 Error building Source for context item.'. Originally TeiidProcessingException '12' XMLSystemFunctions.java:911.: org.teiid.core.TeiidProcessingException: TEIID30151 Error building Source for context item.
      at org.teiid.query.xquery.saxon.XQueryEvaluator.evaluateXQuery(XQueryEvaluator.java:148)
      at org.teiid.query.processor.relational.XMLTableNode$1.run(XMLTableNode.java:269)
      at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:284)
      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(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
      Caused by: nu.xom.ParsingException: 12
      at nu.xom.Builder.build(Unknown Source)
      at nu.xom.Builder.build(Unknown Source)
      at org.teiid.query.xquery.saxon.XQueryEvaluator.evaluateXQuery(XQueryEvaluator.java:142)
      ... 7 more
      Caused by: java.lang.ArrayIndexOutOfBoundsException: 12
      at org.teiid.query.function.source.XMLSystemFunctions.escapeName(XMLSystemFunctions.java:911)
      at org.teiid.query.function.source.XMLSystemFunctions$JsonToXmlContentHandler.startObjectEntry(XMLSystemFunctions.java:226)
      at org.teiid.json.simple.JSONParser.parse(JSONParser.java:232)
      at org.teiid.query.function.source.XMLSystemFunctions$JsonToXmlContentHandler.nextEvent(XMLSystemFunctions.java:351)
      at org.teiid.query.xquery.saxon.XMLEventStreamReader.next(XMLEventStreamReader.java:194)
      at net.sf.saxon.evpull.StaxToEventBridge.next(StaxToEventBridge.java:159)
      at net.sf.saxon.evpull.EventStackIterator.next(EventStackIterator.java:61)
      at net.sf.saxon.evpull.EventIteratorToReceiver.copy(EventIteratorToReceiver.java:44)
      at net.sf.saxon.event.Sender.sendPullEventSource(Sender.java:559)
      at net.sf.saxon.event.Sender.send(Sender.java:132)
      at net.sf.saxon.Configuration.buildDocument(Configuration.java:3361)
      at net.sf.saxon.Configuration.buildDocument(Configuration.java:3303)
      at org.teiid.query.xquery.saxon.SaxonReader.parse(StreamingUtils.java:179)
      ... 10 more

              rhn-engineering-shawkins Steven Hawkins
              andreas.krueck_jira Andreas Krück (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: