Saxon 9.7.0-4. I run the following query:
declare namespace s=\"http://tpox-benchmark.com/security\";
declare namespace c=\"http://tpox-benchmark.com/custacc\";
declare variable $id external;
for $cust in fn:collection()/c:Customer[@id=$id]
for $sec in fn:collection()/s:Security[s:Symbol=$cust/c:Accounts/c:Account/c:Holdings/c:Position/c:Symbol/fn:string(.)]
return <Security>{$sec/s:Name/text()}</Security>
providing a particular $id and iterate through expression tree. When I do evaluateVariable for one of VariableReferences NPE is thrown:
java.lang.NullPointerException: null
at net.sf.saxon.om.SequenceTool.toGroundedValue(SequenceTool.java:49) ~[Saxon-HE-9.7.0-4.jar:na]
at net.sf.saxon.expr.Assignation.evaluateVariable(Assignation.java:130) ~[Saxon-HE-9.7.0-4.jar:na]
..........
Please have a look.
Note: I just moved to Saxon 9.7. Earlier I use Saxon 9.5.1-8 and had no this NPE issue on the same query.
Thanks, Denis.
Anonymous
Hi Denis,
Thanks for reporting the problem you have found. I am having trouble reproducing the NPE. Is it possible that you send over a simple source document and provide the command line that you use.
BTW. We have moved all support issues to the following site: https://saxonica.plan.io https://saxonica.plan.io/ With the project: https://saxonica.plan.io/projects/saxon https://saxonica.plan.io/projects/saxon
Just add details here: https://saxonica.plan.io/issues/2695 https://saxonica.plan.io/issues/2695
kind regards,
O’Neil
Related
Support Requests: #81
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Support Requests"
Hi O'Neil,
Thanks for the quick response.
Yes, I'm aware about the new issue tracker, but haven't found how to submit a new issue there. Do I need to register in order to do so?
Regarding the NPE: I use Saxon via its Java API. I have a custom CollectionFinder class. When Saxon run XQuery against collection(-s) I analyze expression tree and return back custom ResourceCollection which select documents dynamically from my external data store. So, the NPE happens even before I select any source document.
A piece of code where NPE happens is:
.........
Thanks, Denis