New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] util:document-id#1 throws an exception #4262
Comments
Shouldn't be. Generated id for a node is not the same as a document id. If you could share the stack-trace then I can likely spot the issue quickly... Regardless, in general I would advise anyone against using these functions that surface internal ids - as the ids are not stable. |
Affected versions (so far)
|
Version 4.10 works OK for my use-case, so the issue has been introduced since this release.
|
I expect this to work up to and including v5.3.1 |
@adamretter there is no stack trace. Just the dynamic XQuery error is thrown. |
Why I believe that #4167 introduced this regression: |
I can confirm that my query code runs OK on 5.3.1 and that this version does not suffer from the issue |
Hi, I am slightly confused by the release versioning scheme. It seems to me that 4.10 (not 5.3.1) is the most recent version that I can run that does not exhibit the issue I have discovered - is that correct? I notice that 5.3.1 suffers from log4j2 vulns that 4.10 seems to have addressed - so 4.10 would be the best and most recent version that I should run until this issue can be resolved in a new 6.x release (any ideas on when this might be?). |
On Monday's community call we were not able to come to a conclusion how to address this issue. Options are
Comments on what suits the people affected by this issue are welcome. |
Well, as our app is broken if I can't run the query as is, then I vote for converting the doc id to an xs:int ;-) I suspect that our app just uses the Doc id to loop through the xml tickets found in the DB, rather than pulling specific docs by ID, so think it should still work as long as they are returned as xs:ints |
@garymansellricardo For your use-case you should consider switching to |
@line-o The document id's are |
Good to know. I was not able to see that from the value in the error description. |
Describe the bug
A simple call to
Throws an error
Q{http://www.w3.org/2005/xqt-errors}FORG0001
"Invalid value for cast/constructor. can not convert '[I@40f342b9' to xs:int"Expected behavior
An
xs:int
, the ID, if the resource exists or an empty sequence if the resource could not be found.References
This was reported by gary.mansell@ricardo.com on exist-open
Might be related to #4167
To Reproduce
Context (please always complete the following information):
Additional context
conf.xml
? noneThe text was updated successfully, but these errors were encountered: