eXist-db / function-documentation

XQuery Function Documentation and Browser App
GNU Lesser General Public License v2.1
5 stars 14 forks source link

Generate documentation never stops #11

Closed dizzzz closed 6 years ago

dizzzz commented 7 years ago

when pressing the 'update documentation' button, the button never indicates the process is finished.

xquery_function_documentation
joewiz commented 7 years ago

@dizzzz Are you still seeing this? I'm not (using eXist 3.1.0 and the current version of fundocs from the public-repo, 0.8).

duncdrum commented 6 years ago

Yes I can still reproduce this, clicking generate produces the following console errors, and the charging animation just keeps spinning. This however seems to be a fake error, force reloading the page has the function documentation working as expected.

[Error] TypeError: undefined is not an object (evaluating 'c[0].offsetWidth')
    show (bootstrap-3.0.3.min.js:7:17315)
    g (jquery-1.7.1.min.js:2:13120)
    handle (jquery-1.7.1.min.js:3:7449)
    dispatch (jquery-1.7.1.min.js:3:4357)
    i (jquery-1.7.1.min.js:3:334)
[Error] Failed to load resource: the server responded with a status of 400 (Bad Request) (reindex.xql, line 0)
<message>exerr:ERROR Cannot find module class from EXPath repository: org.exist.xquery.ner.StanfordNERModule [at line 54, column 53, source: /db/apps/fundocs/modules/scan.xql]
In function:
    docs:load-internal-modules(function) [77:9:/db/apps/fundocs/modules/scan.xql]
    docs:load-fundocs(xs:string) [12:39:/db/apps/fundocs/modules/scan.xql]</message>

I m not quite sure what to make of this, since stanford NER was installed on the system reporting the error. All repo.xmls involved are clean, …so yeah

Updating jquery might be worth a shot.

joewiz commented 6 years ago

With eXist 4.0.0, clicking on the Generate button issues a POST request to http://localhost:8080/exist/apps/fundocs/modules/reindex.xql, which returns a 404, with the following response (captured via Chrome Developer Tools > Network pane):

<exception>
    <path>/db/apps/fundocs/modules/reindex.xql</path>
    <message>err:XPST0003 error found while loading module docs: Error 
        while loading module scan.xql: Syntax error within user defined function 
        docs:create-collection: unexpected token: ( [at line 11, column 101]
    </message>
</exception>

This signaled, and a look at scan.xql confirmed, that we had a case of the empty() sequence type that snuck through into the 4.0.0 release. We had fixed this in source but hadn't published the revised package to the public-repo. I've just published a new version, which incidentally fixed a different problem with the app's versioning. I bumped the fundocs app to v1.0.0 to signal incompatibility with eXist-db v4.0.0.

Thanks for your persistence in reporting this issue.