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