describe bookpath layout, show informative error
See original GitHub issueWhen I configure a non-default bookpath
as described by the documentation, I always get this:
Ooopps!
That should not have happened!
It seems like the server has mixed something up.
Error code: 500
This does not help at all. The server’s log then showed several null pointer exceptions, among them de.uniwue.web.io.FileDatabase.listBookFiles
.
Digging into that, I found that there is sufficient documentation on the expected directory structure in the sources. But I cannot browse that API documentation, and IMHO this particular piece of knowledge crucially belongs into the user documentation as well.
Also, IIUC, a bookpath must always be a flat directory with certain file name patterns to separate pages but group annotations. This strikes me as overly restrictive. Perhaps this can be generalized to layouts like those we have in OCR-D – subdirectories for annotations, PAGE-XML’s @imageFilename
relative to the root directory of the book?
So please,
- document the expected directory structure for
bookpath
in the README (or similar) - catch the null pointer exception and give a meaningful error message
- [optionally] generalize expectation to non-flat directory structure
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
Hello @bertsky, thanks for your feedback and please excuse the problems that arose from the lack of documentation regarding the bookpath and the related problems. We’ll add this crucial information to the README, fix the exception handling and look into the described problem with using the custom bookpath as soon as possible.
We’ll also look into your suggestion regarding the alternative directory structure as it sounds pretty reasonable and (as far as I can judge at the moment) nothing speaks against it.
Thanks again for your helpful feedback.
While trying to fix this bug we had similar observations as you but sadly couldn’t yet force LAREX to actually use the user-supplied book path when it’s outside
jetty.home
orcatalina.home
. We now moved this issue to the top of our internal to-do list and hope to ship a fix within the next week.Please excuse this rather annoying bug and any inconveniences caused by it.