-
Notifications
You must be signed in to change notification settings - Fork 15
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
Problem with type list in creator #72
Comments
Thanks for raising this @GermaineG, I'll have a look. |
Looks like this was the result of a simple typo on my part. I've fixed it in 6d415a5. |
Hi @GermaineG, this has been resolved in v.1.4.2. |
… the database, closes dlcs#72.
Hi @danielgrant A type list in the selector still poses a problem, because then a NullPointerException is thrown, which leads to missing entries at least in the tables Find below a more detailed description of the problem. I can also open a new issue for it if preferred, but I think it fits here somehow. Steps: Example (partial):
What happens:
Source of the problem: The selector in the given example has more than one type (as you can see, the additional types are created by the anno4j library in this case). The problem in the source code can be found in
|
Hi @GermaineG, The problem you've got here is that the annotation you are creating is not valid, as per the W3C Annotation Data Model: https://www.w3.org/TR/annotation-model/#svg-selector Specifically:
This is the reason the code currently looks for a single I'll re-open this issue for further consideration. Cheers, |
Hi @danielgrant Thank you for your very quick answer. If there can only be one type (field) and it must include SvgSelector, then in my opinion a list of types in one type field is valid, as long as one of the elements in the list is "SvgSelector". However, weirdly enough the svg selector is the only selector type where the sentence says "must include".
Strange. Might even be worth an issue with the web annotation itself then. |
In case of a list of multiple types for a creator of an annotation (WADM), it looks like the parsing of the type list fails and as a result the creator isn't created in the database, so it cannot be used for search.
Failing example input for annotation creation:
Working example input:
It works with a type list as long as the list only has one element. With two or more it fails.
Weirdly enough, from what I have tested, to me it looks like there is no creator put into the database if at least one of the following is true:
The incomplete storage of information about the annotation happens very quietly, besides missing search results there is nearly no indication about a failure, the server is responding happily with a
201 Created
and the annotation itself does indeed get created.In the
postgres.log
the following error occurred at some point (since I am not having time stamps there, I don't know when exactly and I am having a hard time reproducing something like this properly for all problematic cases stated above):So my best guess would be that when the type list string gets split, the first entry of the array is something like
["https://github.com/anno4j/ns#Resource"
, which is not valid json.The error might effect other parts as well, the creator just happened to be the part where I've stumbled upon the problem.
The text was updated successfully, but these errors were encountered: