-
Bug
-
Resolution: Done
-
Major
-
None
-
8.3
-
None
I've creted a virtual procedure like this one:
CREATE VIRTUAL PROCEDURE
BEGIN
IF(accident_proc.getaccident.id = null)
BEGIN
SELECT XMLELEMENT(NAME accidents, XMLAGG(XMLELEMENT(NAME accident, XMLFOREST(accident_view.accident.id, accident_view.accident.lat, accident_view.accident.lon, accident_view.accident.accident_date)))) AS result FROM accident_view.accident;
END
ELSE
BEGIN
SELECT XMLELEMENT(NAME accidents, XMLAGG(XMLELEMENT(NAME accident, XMLFOREST(accident_view.accident.id, accident_view.accident.lat, accident_view.accident.lon, accident_view.accident.accident_date)))) AS result FROM accident_view.accident WHERE accident_view.accident.id = accident_proc.getaccident.id;
END
END
invoke it from squirrelsql like this
select * from accident_proc.getaccident where id=1;
the actual table has just 1 row that is exposed through the VDB and can be red correctly.
I get this exception
14:56:42,573 ERROR [org.teiid.PROCESSOR] (Worker7_QueryProcessorQueue28) TEIID30019 Unexpected exception for request OFF
fN2xoRDPn.8: java.lang.NoSuchMethodError: javax.xml.stream.XMLEventFactory.newFactory()Ljavax/xml/stream/XMLEventFactory
;
at org.teiid.query.function.source.XMLSystemFunctions$4.initialValue(XMLSystemFunctions.java:395) [teiid-engine-
8.3.0.Beta2.jar:8.3.0.Beta2]
at org.teiid.query.function.source.XMLSystemFunctions$4.initialValue(XMLSystemFunctions.java:393) [teiid-engine-
8.3.0.Beta2.jar:8.3.0.Beta2]
at java.lang.ThreadLocal.setInitialValue(ThreadLocal.java:141) [rt.jar:1.6.0_04]
at java.lang.ThreadLocal.get(ThreadLocal.java:131) [rt.jar:1.6.0_04]
at org.teiid.query.function.source.XMLSystemFunctions$4.get(XMLSystemFunctions.java:398) [teiid-engine-8.3.0.Bet
a2.jar:8.3.0.Beta2]
at org.teiid.query.function.source.XMLSystemFunctions$4.get(XMLSystemFunctions.java:393) [teiid-engine-8.3.0.Bet
a2.jar:8.3.0.Beta2]
at org.teiid.query.function.source.XMLSystemFunctions$6.translate(XMLSystemFunctions.java:476) [teiid-engine-8.3
.0.Beta2.jar:8.3.0.Beta2]
at org.teiid.query.function.source.XMLSystemFunctions.saveToBufferManager(XMLSystemFunctions.java:989) [teiid-en
gine-8.3.0.Beta2.jar:8.3.0.Beta2]
at org.teiid.query.function.source.XMLSystemFunctions.xmlForest(XMLSystemFunctions.java:468) [teiid-engine-8.3.0
.Beta2.jar:8.3.0.Beta2]
at org.teiid.query.eval.Evaluator.evaluateXMLForest(Evaluator.java:887) [teiid-engine-8.3.0.Beta2.jar:8.3.0.Beta
2]
at org.teiid.query.eval.Evaluator.internalEvaluate(Evaluator.java:648) [teiid-engine-8.3.0.Beta2.jar:8.3.0.Beta2
]
at org.teiid.query.eval.Evaluator.evaluateXMLElement(Evaluator.java:915) [teiid-engine-8.3.0.Beta2.jar:8.3.0.Bet
a2]
at org.teiid.query.eval.Evaluator.internalEvaluate(Evaluator.java:646) [teiid-engine-8.3.0.Beta2.jar:8.3.0.Beta2
]
at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:596) [teiid-engine-8.3.0.Beta2.jar:8.3.0.Beta2]
at org.teiid.query.processor.relational.GroupingNode$ProjectingTupleSource.updateTuple(GroupingNode.java:84) [te
iid-engine-8.3.0.Beta2.jar:8.3.0.Beta2]
at org.teiid.query.processor.BatchCollector$BatchProducerTupleSource.nextTuple(BatchCollector.java:95) [teiid-en
gine-8.3.0.Beta2.jar:8.3.0.Beta2]
at org.teiid.query.processor.relational.GroupingNode.groupPhase(GroupingNode.java:382) [teiid-engine-8.3.0.Beta2
.jar:8.3.0.Beta2]
at org.teiid.query.processor.relational.GroupingNode.nextBatchDirect(GroupingNode.java:322) [teiid-engine-8.3.0.
Beta2.jar:8.3.0.Beta2]
at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:279) [teiid-engine-8.3.0.Be
ta2.jar:8.3.0.Beta2]
at org.teiid.query.processor.relational.ProjectNode.nextBatchDirect(ProjectNode.java:146) [teiid-engine-8.3.0.Be
ta2.jar:8.3.0.Beta2]
at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:279) [teiid-engine-8.3.0.Be
ta2.jar:8.3.0.Beta2]
at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:149) [teiid-engine-8.3.0.Be
ta2.jar:8.3.0.Beta2]
at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:144) [teiid-engine-8.3.0.Beta2.j
ar:8.3.0.Beta2]
at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:110) [teiid-engine-8.3.0.Beta2.jar:8.3
.0.Beta2]
at org.teiid.query.processor.BatchIterator.finalRow(BatchIterator.java:70) [teiid-engine-8.3.0.Beta2.jar:8.3.0.B
eta2]
at org.teiid.common.buffer.AbstractTupleSource.getCurrentTuple(AbstractTupleSource.java:69) [teiid-engine-8.3.0.
Beta2.jar:8.3.0.Beta2]
at org.teiid.query.processor.BatchIterator.getCurrentTuple(BatchIterator.java:85) [teiid-engine-8.3.0.Beta2.jar:
8.3.0.Beta2]
at org.teiid.common.buffer.AbstractTupleSource.hasNext(AbstractTupleSource.java:91) [teiid-engine-8.3.0.Beta2.ja
r:8.3.0.Beta2]
at org.teiid.query.processor.proc.ProcedurePlan.executePlan(ProcedurePlan.java:579) [teiid-engine-8.3.0.Beta2.ja
r:8.3.0.Beta2]
at org.teiid.query.processor.proc.CreateCursorResultSetInstruction.process(CreateCursorResultSetInstruction.java
:68) [teiid-engine-8.3.0.Beta2.jar:8.3.0.Beta2]
at org.teiid.query.processor.proc.ProcedurePlan.processProcedure(ProcedurePlan.java:388) [teiid-engine-8.3.0.Bet
a2.jar:8.3.0.Beta2]
at org.teiid.query.processor.proc.ProcedurePlan.nextBatchDirect(ProcedurePlan.java:315) [teiid-engine-8.3.0.Beta
2.jar:8.3.0.Beta2]
at org.teiid.query.processor.proc.ProcedurePlan.nextBatch(ProcedurePlan.java:289) [teiid-engine-8.3.0.Beta2.jar:
8.3.0.Beta2]
at org.teiid.query.processor.relational.PlanExecutionNode.nextBatchDirect(PlanExecutionNode.java:118) [teiid-eng
ine-8.3.0.Beta2.jar:8.3.0.Beta2]
at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:279) [teiid-engine-8.3.0.Be
ta2.jar:8.3.0.Beta2]
at org.teiid.query.processor.relational.ProjectNode.nextBatchDirect(ProjectNode.java:146) [teiid-engine-8.3.0.Be
ta2.jar:8.3.0.Beta2]
at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:279) [teiid-engine-8.3.0.Be
ta2.jar:8.3.0.Beta2]
at org.teiid.query.processor.relational.ProjectNode.nextBatchDirect(ProjectNode.java:146) [teiid-engine-8.3.0.Be
ta2.jar:8.3.0.Beta2]
at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:279) [teiid-engine-8.3.0.Be
ta2.jar:8.3.0.Beta2]
at org.teiid.query.processor.relational.LimitNode.nextBatchDirect(LimitNode.java:101) [teiid-engine-8.3.0.Beta2.
jar:8.3.0.Beta2]
at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:279) [teiid-engine-8.3.0.Be
ta2.jar:8.3.0.Beta2]
at org.teiid.query.processor.relational.ProjectNode.nextBatchDirect(ProjectNode.java:146) [teiid-engine-8.3.0.Be
ta2.jar:8.3.0.Beta2]
at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:279) [teiid-engine-8.3.0.Be
ta2.jar:8.3.0.Beta2]
at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:149) [teiid-engine-8.3.0.Be
ta2.jar:8.3.0.Beta2]
at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:144) [teiid-engine-8.3.0.Beta2.j
ar:8.3.0.Beta2]
at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:110) [teiid-engine-8.3.0.Beta2.jar:8.3
.0.Beta2]
at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:153) [teiid-engine-8.3.0.Beta2.jar
:8.3.0.Beta2]
at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:400) [teiid-engine-8.3.0.Beta
2.jar:8.3.0.Beta2]
at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:296) [teiid-engine-8.3.0.Beta2.ja
r:8.3.0.Beta2]
at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:49) [teiid-engine-8.3.0.Beta2.jar:8
.3.0.Beta2]
at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:224) [teiid-engine-8.3.0.Beta2.jar:8.
3.0.Beta2]
at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:253) [teiid-engine-8.3.0.Beta2
.jar:8.3.0.Beta2]
at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:123) [teiid-e
ngine-8.3.0.Beta2.jar:8.3.0.Beta2]
at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:298) [teiid-engine-8.3.0.Be
ta2.jar:8.3.0.Beta2]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) [rt.jar:1.6.0_04]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) [rt.jar:1.6.0_04]
at java.lang.Thread.run(Thread.java:619) [rt.jar:1.6.0_04]