Skip to content

Instantly share code, notes, and snippets.

@ejlp12
Last active May 4, 2016 13:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ejlp12/04df2a50ba13c778f194 to your computer and use it in GitHub Desktop.
Save ejlp12/04df2a50ba13c778f194 to your computer and use it in GitHub Desktop.

Virtual table is set to materialized (cached) - both internal or external will result the same error

19:09:38,264 INFO  [org.teiid.PROCESSOR.MATVIEWS] (Worker7_QueryProcessorQueue115) TEIID30013 Loading materialized view table #MAT_POC_XYZ_WS_TABLE.V_WS_WIL
19:09:38,289 INFO  [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] (Worker11_QueryProcessorQueue116) Creating Service {http://teiid.org}teiid from class org.apache.cxf.jaxws.support.DummyImpl
19:09:48,402 ERROR [org.teiid.PROCESSOR.MATVIEWS] (Worker7_QueryProcessorQueue117) TEIID30015 Failed to load materialized view table #MAT_POC_XYZ_WS_TABLE.V_WS_WIL.: org.teiid.core.TeiidProcessingException: TEIID30151 Error building Source for context item.
	at org.teiid.query.xquery.saxon.XQueryEvaluator.evaluateXQuery(XQueryEvaluator.java:140) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6]
	at org.teiid.query.processor.relational.XMLTableNode$1.run(XMLTableNode.java:242) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6]
	at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:274) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6]
	at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6]
	at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_40]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_40]
	at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_40]
Caused by: nu.xom.ParsingException: Error reported by XML parser: Maximum Number of Children Elements Exceeded
	at nu.xom.Builder.build(Builder.java:1175) [xom-1.2.7.redhat-4.jar:1.2.7.redhat-4]
	at nu.xom.Builder.build(Builder.java:602) [xom-1.2.7.redhat-4.jar:1.2.7.redhat-4]
	at org.teiid.query.xquery.saxon.XQueryEvaluator.evaluateXQuery(XQueryEvaluator.java:134) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6]
	... 7 more
Caused by: org.xml.sax.SAXException: Error reported by XML parser: Maximum Number of Children Elements Exceeded
net.sf.saxon.trans.XPathException: Error reported by XML parser: Maximum Number of Children Elements Exceeded
	at org.teiid.query.xquery.saxon.SaxonReader.parse(StreamingUtils.java:171) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6]
	at nu.xom.Builder.build(Builder.java:1162) [xom-1.2.7.redhat-4.jar:1.2.7.redhat-4]
	... 9 more
Caused by: net.sf.saxon.trans.XPathException: Error reported by XML parser: Maximum Number of Children Elements Exceeded
	at net.sf.saxon.evpull.StaxToEventBridge.next(StaxToEventBridge.java:159) [saxonhe-9.2.1.5.jar:]
	at net.sf.saxon.evpull.EventStackIterator.next(EventStackIterator.java:54) [saxonhe-9.2.1.5.jar:]
	at net.sf.saxon.evpull.EventIteratorToReceiver.copy(EventIteratorToReceiver.java:34) [saxonhe-9.2.1.5.jar:]
	at net.sf.saxon.event.Sender.sendPullEventSource(Sender.java:523) [saxonhe-9.2.1.5.jar:]
	at net.sf.saxon.event.Sender.send(Sender.java:148) [saxonhe-9.2.1.5.jar:]
	at net.sf.saxon.Configuration.buildDocument(Configuration.java:3317) [saxonhe-9.2.1.5.jar:]
	at net.sf.saxon.Configuration.buildDocument(Configuration.java:3262) [saxonhe-9.2.1.5.jar:]
	at org.teiid.query.xquery.saxon.SaxonReader.parse(StreamingUtils.java:169) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6]
19:09:48,406 WARN  [org.teiid.PROCESSOR] (Worker7_QueryProcessorQueue117) TEIID30020 Processing exception for request BwSRXLVRea7Q.0 'TEIID30151 Error building Source for context item.'. Originally TeiidProcessingException 'Error reported by XML parser: Maximum Number of Children Elements Exceeded' StaxToEventBridge.java:159. Enable more detailed logging to see the entire stacktrace.
	
@ejlp12
Copy link
Author

ejlp12 commented May 4, 2016

Another error.. not the same case as above

20:04:33,677 INFO org.teiid.PROCESSOR.MATVIEWS TEIID30013 Loading materialized view table #MAT_POCVIEWMODEL.CLTB_AMOUNT_PAID
20:04:33,681 ERROR org.teiid.PROCESSOR.MATVIEWS TEIID30015 Failed to load materialized view table #MAT_POCVIEWMODEL.CLTB_AMOUNT_PAID.: org.teiid.api.exception.query.QueryPlannerException: TEIID30498 Capabilities for EximBankPOC were not avaialable. The command could not be planned properly.
at org.teiid.query.optimizer.relational.PlanToProcessConverter.convertNode(PlanToProcessConverter.java:323) [teiid-engine-8.7.5.6_2-redhat-2.jar:8.7.5.6_2-redhat-2]
...

@ejlp12
Copy link
Author

ejlp12 commented May 4, 2016

Root cause: Data source JNDI name is different.
Let say you have data source to connect to the target physical database, the Data Source list usually shown like this:

name: ABC
JNDI: java:/ABC

Klik Runtime > Virtual Database, select the deployed VDB, klik Models tab, change the Data Source JNDI Name by clicking the cell,
make sure the value is ABC (without prefix java:/)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment