Ticket #709 (closed task: fixed)
[M] d2boneoff failing for some MDIP records
Reported by: | selatham | Owned by: | sdonegan |
---|---|---|---|
Priority: | required | Milestone: | Reporting |
Component: | discovery | Version: | |
Keywords: | MDIP WS-Discovery2 | Cc: |
Description
This is failing with an uncaptured Java error on some MDIP records only. The records are in the glue exist /db/discovery/original/MDIP/dassh.ac.uk. For instance record dassh.ac.ukMDIPMRMLN00400000034.xml works. Whereas record dassh.ac.ukMDIPMRMLN00400000035.xml fails. Error message:-
org.xmldb.api.base.XMLDBException: The actual cardinality for parameter 1 does not match the cardinality declared in the function's signature: string($a as item?) xs:string. Expected cardinality: zero or one, got 2. at org.exist.xmldb.RemoteXPathQueryService.throwException(RemoteXPathQueryService.java:113) at org.exist.xmldb.RemoteXPathQueryService.query(RemoteXPathQueryService.java:56) at org.exist.xmldb.RemoteXPathQueryService.query(RemoteXPathQueryService.java:36) at org.exist.xmldb.RemoteXPathQueryService.execute(RemoteXPathQueryService.java:244) at ndg.services.buildmole.Main.main(Main.java:255) Caused by: org.exist.xquery.XPathException: The actual cardinality for parameter 1 does not match the cardinality declared in the function's signature: string($a as item?) xs:string. Expected cardinality: zero or one, got 2. at org.exist.xmldb.RemoteXPathQueryService.throwException(RemoteXPathQueryService.java:112) ... 4 more
Change History
comment:2 Changed 14 years ago by selatham
- Status changed from closed to reopened
- Resolution invalid deleted
Kev - is it possible to at least trap the error. Say 'error code 99 = other error'. Then I stand a chance of trapping more errors and doing something appropriate.
comment:3 Changed 14 years ago by ko23
Yes, it is possible to catch the case where the xquery dies, and I'll look at adding that into the next iteration.
However, I still have to say that it would be easier and better to validate rather than spend time putting in fixes for problems that shouldn't exist.
Example XML is invalid, e.g. see Subject element. Can't fix something so thoroughly broken.