]
dalex dalex commented on TEIID-5258:
------------------------------------
[~shawkins] at last I could check the fix from TEIID-5242 issue and it worked, thx again.
TEIID30151 Error building Source for context item
-------------------------------------------------
Key: TEIID-5258
URL:
https://issues.jboss.org/browse/TEIID-5258
Project: Teiid
Issue Type: Bug
Components: XML Connector
Affects Versions: 10.1
Environment: teiid-10.1.0 on WildFly Full 11.0.0.Final (WildFly Core
3.0.8.Final)
Reporter: dalex dalex
Assignee: Steven Hawkins
Attachments: failed.json
When running the following script:
{code:sql}
Begin
with t As (
Select campaign_id, email_address, activity
From (
call files.getFiles(pathAndPattern => 'failed.json')
) f
Cross Join
XmlTable (
'/root/emails'
Passing JsonToXml('root', f.file)
Columns
campaign_id string,
list_id string,
list_is_active boolean,
email_id string,
email_address string,
activity xml
) x
Where activity Is Not Null
)
Select *
From t Cross Join XmlTable (
'/root/activity'
Passing XmlElement(root, t.activity)
Columns
action string,
"timestamp" timestamp,
url string,
ip string
) a;
End;
{code}
teiid throws out the following error:
{code:noformat}
2018-02-13 17:55:47,054 WARN [org.teiid.PROCESSOR] (Worker2_QueryProcessorQueue7)
/okCCfP2/yjh TEIID30020 Processing exception for request /okCCfP2/yjh.0 'TEIID30151
Error building
Source for context item.'. Originally TeiidProcessingException
StaxToEventBridge.java:325.: org.teiid.core.TeiidProcessingException: TEIID30151 Error
building Source for context item
.
at
org.teiid.query.xquery.saxon.XQueryEvaluator.evaluateXQuery(XQueryEvaluator.java:163)
at
org.teiid.query.processor.relational.XMLTableNode$1.run(XMLTableNode.java:265)
at
org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:280)
at
org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:115)
at
org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:206)
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: nu.xom.ParsingException
at nu.xom.Builder.build(Unknown Source)
at nu.xom.Builder.build(Unknown Source)
at
org.teiid.query.xquery.saxon.XQueryEvaluator.evaluateXQuery(XQueryEvaluator.java:157)
... 7 more
Caused by: java.lang.NullPointerException
at net.sf.saxon.evpull.StaxToEventBridge.getSystemId(StaxToEventBridge.java:325)
at net.sf.saxon.evpull.StaxToEventBridge.getSystemId(StaxToEventBridge.java:385)
at
net.sf.saxon.event.ContentHandlerProxyLocator.getSystemId(ContentHandlerProxyLocator.java:72)
at nu.xom.XOMHandler.startElement(Unknown Source)
at
net.sf.saxon.event.ContentHandlerProxy.startContent(ContentHandlerProxy.java:373)
at
org.teiid.query.xquery.saxon.ContentHandlerProxyReceiver.startContent(StreamingUtils.java:291)
at net.sf.saxon.event.ProxyReceiver.startContent(ProxyReceiver.java:177)
at
org.teiid.query.xquery.saxon.PathMapFilter.startContent(PathMapFilter.java:226)
at net.sf.saxon.event.TreeReceiver.startContent(TreeReceiver.java:220)
at
net.sf.saxon.evpull.EventIteratorToReceiver.copy(EventIteratorToReceiver.java:78)
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:175)
... 10 more
{code}