Actions
Bug #5051
closedClassCastException: TinyElementImpl cannot be cast to class net.sf.saxon.value.NumericValue
Status:
Duplicate
Priority:
Low
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
2021-07-29
Due date:
% Done:
0%
Estimated time:
Legacy ID:
Applies to branch:
10
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:
Description
The query:
for $i in (<_>1</_>, 2)
return 'x'[$i]
The expected result: x x
The returned result:
java.lang.ClassCastException: class net.sf.saxon.tree.tiny.TinyElementImpl cannot be cast to class net.sf.saxon.value.NumericValue (net.sf.saxon.tree.tiny.TinyElementImpl and net.sf.saxon.value.NumericValue are in unnamed module of loader 'app')
at net.sf.saxon.expr.SubscriptExpression.evaluateItem(SubscriptExpression.java:151)
at net.sf.saxon.expr.Expression.process(Expression.java:940)
at com.saxonica.ee.bytecode.ByteCodeCandidate.process(ByteCodeCandidate.java:146)
at net.sf.saxon.expr.ForExpression.lambda$process$0(ForExpression.java:399)
at net.sf.saxon.om.SequenceIterator.forEachOrFail(SequenceIterator.java:135)
at net.sf.saxon.expr.ForExpression.process(ForExpression.java:397)
at com.saxonica.ee.bytecode.ByteCodeCandidate.process(ByteCodeCandidate.java:146)
at net.sf.saxon.query.XQueryExpression.run(XQueryExpression.java:453)
at net.sf.saxon.s9api.XQueryEvaluator.run(XQueryEvaluator.java:369)
at net.sf.saxon.Query.runQuery(Query.java:895)
at net.sf.saxon.Query.doQuery(Query.java:423)
at net.sf.saxon.Query.main(Query.java:97)
java.lang.RuntimeException: Internal error evaluating template rule at line 2 in module file:/c:/Users/user/Desktop/x.xq
at com.saxonica.ee.bytecode.ByteCodeCandidate.process(ByteCodeCandidate.java:159)
at net.sf.saxon.expr.ForExpression.lambda$process$0(ForExpression.java:399)
at net.sf.saxon.om.SequenceIterator.forEachOrFail(SequenceIterator.java:135)
at net.sf.saxon.expr.ForExpression.process(ForExpression.java:397)
at com.saxonica.ee.bytecode.ByteCodeCandidate.process(ByteCodeCandidate.java:146)
at net.sf.saxon.query.XQueryExpression.run(XQueryExpression.java:453)
at net.sf.saxon.s9api.XQueryEvaluator.run(XQueryEvaluator.java:369)
at net.sf.saxon.Query.runQuery(Query.java:895)
at net.sf.saxon.Query.doQuery(Query.java:423)
at net.sf.saxon.Query.main(Query.java:97)
Hope this helps.
Please register to edit this issue
Actions