Discussion:
[Exist-open] Strange error in eXist (err:XQST0059)
Honza Hejzl
2016-02-08 15:08:06 UTC
Permalink
Hi all,

I am struggling with a strange error in eXist today. It had emerged during
testing a short jQuery script. Since the moment the app throws:

<exception>
<path>/db/apps/karolinum-apps/modules/view.xql</path>
<message>err:XQST0059 error found while loading module app: Module
location hint URI 'app.xql does not refer to an XQuery.</message>
</exception>

Immediately, I tried to return back to the former state of the app (simply
deleted the javascript code). Nothing helps. I have tried to upgrade the
whole server, checked the uri mentioned or so. The only one thing I can
imagine is some really bad typo I can’t track at the moment. The javascript
file seems ok, no warnings. In the app.xql file, there is a lot of warnings
at the beginning of the file. The very first is before the first statement
line (xquery version "3.0";), it says "Missing ';' before statement.

Really scary.

Please, do you have any idea what could I try? The bad thing is I tried to
use other installation of eXist (under other directory) but it does exactly
the same.

Best, Honza Hejzl

P.S. I am not aware of any changes I could made in some config file or so!
P.P.S. Joe, thanks in advance!
Peter Stadler
2016-02-08 15:24:53 UTC
Permalink
Maybe there is in fact a missing „;“ after an import statement or a namespace declaration?
Can you show us the file ‚app.xql' ?

Best
Peter
Post by Honza Hejzl
Hi all,
<exception>
<path>/db/apps/karolinum-apps/modules/view.xql</path>
<message>err:XQST0059 error found while loading module app: Module location hint URI 'app.xql does not refer to an XQuery.</message>
</exception>
Immediately, I tried to return back to the former state of the app (simply deleted the javascript code). Nothing helps. I have tried to upgrade the whole server, checked the uri mentioned or so. The only one thing I can imagine is some really bad typo I can’t track at the moment. The javascript file seems ok, no warnings. In the app.xql file, there is a lot of warnings at the beginning of the file. The very first is before the first statement line (xquery version "3.0";), it says "Missing ';' before statement.
Really scary.
Please, do you have any idea what could I try? The bad thing is I tried to use other installation of eXist (under other directory) but it does exactly the same.
Best, Honza Hejzl
P.S. I am not aware of any changes I could made in some config file or so!
P.P.S. Joe, thanks in advance!
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140_______________________________________________
Exist-open mailing list
https://lists.sourceforge.net/lists/listinfo/exist-open
--
Peter Stadler
Carl-Maria-von-Weber-Gesamtausgabe
Arbeitsstelle Detmold
Hornsche Str. 39
D-32756 Detmold
Tel. +49 5231 975-676
Fax: +49 5231 975-668
stadler at weber-gesamtausgabe.de
www.weber-gesamtausgabe.de
Honza Hejzl
2016-02-08 15:38:46 UTC
Permalink
Thanks, of course!

In fact, I was editing the jQuery script and the file app.xql itself :)
(but on other level, typo is very possible).

Here it is.
<http://46.28.111.241:8081/exist/rest/apps/karolinum-apps/modules/app.xql>

Best, Honza
Post by Peter Stadler
Maybe there is in fact a missing „;“ after an import statement or a
namespace declaration?
Can you show us the file ‚app.xql' ?
Best
Peter
Post by Honza Hejzl
Hi all,
I am struggling with a strange error in eXist today. It had emerged
<exception>
<path>/db/apps/karolinum-apps/modules/view.xql</path>
<message>err:XQST0059 error found while loading module app: Module
location hint URI 'app.xql does not refer to an XQuery.</message>
Post by Honza Hejzl
</exception>
Immediately, I tried to return back to the former state of the app
(simply deleted the javascript code). Nothing helps. I have tried to
upgrade the whole server, checked the uri mentioned or so. The only one
thing I can imagine is some really bad typo I can’t track at the moment.
The javascript file seems ok, no warnings. In the app.xql file, there is a
lot of warnings at the beginning of the file. The very first is before the
first statement line (xquery version "3.0";), it says "Missing ';' before
statement.
Post by Honza Hejzl
Really scary.
Please, do you have any idea what could I try? The bad thing is I tried
to use other installation of eXist (under other directory) but it does
exactly the same.
Post by Honza Hejzl
Best, Honza Hejzl
P.S. I am not aware of any changes I could made in some config file or
so!
Post by Honza Hejzl
P.P.S. Joe, thanks in advance!
------------------------------------------------------------------------------
Post by Honza Hejzl
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140_______________________________________________
Post by Honza Hejzl
Exist-open mailing list
https://lists.sourceforge.net/lists/listinfo/exist-open
--
Peter Stadler
Carl-Maria-von-Weber-Gesamtausgabe
Arbeitsstelle Detmold
Hornsche Str. 39
D-32756 Detmold
Tel. +49 5231 975-676
Fax: +49 5231 975-668
stadler at weber-gesamtausgabe.de
www.weber-gesamtausgabe.de
Joe Wicentowski
2016-02-08 15:29:50 UTC
Permalink
Hi Honza,
Post by Honza Hejzl
err:XQST0059 error found while loading module app: Module location hint URI 'app.xql does not refer to an XQuery.
I traced this error code to a series of conditional checks in
XQueryContext.java. Here are the two conditions that could lead to
this specific "does not refer to an XQuery" message:

- if 'app.xql' is not a binary file - namely, if the database thinks
it's an XML document
- if 'app.xql' has a mime type other than 'application/xquery'

There are a few ways to check the xml vs. binary and mimetype status
of 'app.xql', but I'd suggest you open eXide, go to File > Manage,
navigate to the 'app.xql' in question, select it (single-click on the
filename), and select the Properties icon (the icon looks like the
lower case letter "i"). This Properties window shows, among other
things, a file's "Mime" - or mime type. Your file's mime type should
say 'application/xquery'. If not, change it to this value.

The Properties window doesn't explicitly say whether a file is an XML
document or a binary file, but you can test this with XQuery using the
following code:

let $resource-uri := '/db/apps/eXide/controller.xql' (: replace
'path-to' with the actual path :)
return
if (util:binary-doc-available($resource-uri)) then
"'" || $resource-uri || "' is a binary file with mime type '"
|| xmldb:get-mime-type($resource-uri) || "'."
else if (doc-available($resource-uri)) then
"'" || $resource-uri || "' is an XML document with mime type
'" || xmldb:get-mime-type($resource-uri) || "'."
else
"'" || $resource-uri || "' was not found. Check the value you
provided for $resource-uri."

Joe
Joe Wicentowski
2016-02-08 15:31:53 UTC
Permalink
Let me re-try that code snippet - I changed a few things during testing and
only now noticed a few inconsistencies:

--

xquery version "3.0";

let $resource-uri := '/db/path-to/app.xql' (: replace 'path-to' with the
actual path to your 'app.xql' file :)
return
if (util:binary-doc-available($resource-uri)) then
"'" || $resource-uri || "' is a binary file with mime type '" ||
xmldb:get-mime-type($resource-uri) || "'."
else if (doc-available($resource-uri)) then
"'" || $resource-uri || "' is an XML document with mime type '" ||
xmldb:get-mime-type($resource-uri) || "'."
else
"'" || $resource-uri || "' was not found. Check the value you
provided for $resource-uri."
Honza Hejzl
2016-02-10 15:52:09 UTC
Permalink
Hi all,

Does anybody know whether the latest Apache FOP (2.1) will be included in
the next version of eXist?

Is there any information about using the latest version in older eXist’s
releases? I have found this
<https://en.wikibooks.org/wiki/XQuery/Installing_the_XSL-FO_module> but in
3.0RC1, many parts of config files are different and it is not possible to
stick to the process step by step. I am not sure what to omit or use (what
is new or deprecated). The build that is recommended at the bottom of the
article, naturally, fails in my case (because of some problem with the
FOPFactory class, I have downloaded the file manually
).

Best, Honza
Post by Joe Wicentowski
Let me re-try that code snippet - I changed a few things during testing
--
xquery version "3.0";
let $resource-uri := '/db/path-to/app.xql' (: replace 'path-to' with the
actual path to your 'app.xql' file :)
return
if (util:binary-doc-available($resource-uri)) then
"'" || $resource-uri || "' is a binary file with mime type '" ||
xmldb:get-mime-type($resource-uri) || "'."
else if (doc-available($resource-uri)) then
"'" || $resource-uri || "' is an XML document with mime type '" ||
xmldb:get-mime-type($resource-uri) || "'."
else
"'" || $resource-uri || "' was not found. Check the value you
provided for $resource-uri."
Adam Retter
2016-02-10 17:40:18 UTC
Permalink
See - https://github.com/eXist-db/exist/pull/912
Post by Honza Hejzl
Hi all,
Does anybody know whether the latest Apache FOP (2.1) will be included in
the next version of eXist?
Is there any information about using the latest version in older eXist’s
releases? I have found this but in 3.0RC1, many parts of config files are
different and it is not possible to stick to the process step by step. I am
not sure what to omit or use (what is new or deprecated). The build that is
recommended at the bottom of the article, naturally, fails in my case
(because of some problem with the FOPFactory class, I have downloaded the
file manually…).
Best, Honza
Post by Joe Wicentowski
Let me re-try that code snippet - I changed a few things during testing
--
xquery version "3.0";
let $resource-uri := '/db/path-to/app.xql' (: replace 'path-to' with the
actual path to your 'app.xql' file :)
return
if (util:binary-doc-available($resource-uri)) then
"'" || $resource-uri || "' is a binary file with mime type '" ||
xmldb:get-mime-type($resource-uri) || "'."
else if (doc-available($resource-uri)) then
"'" || $resource-uri || "' is an XML document with mime type '" ||
xmldb:get-mime-type($resource-uri) || "'."
else
"'" || $resource-uri || "' was not found. Check the value you
provided for $resource-uri."
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Exist-open mailing list
https://lists.sourceforge.net/lists/listinfo/exist-open
--
Adam Retter

eXist Developer
{ United Kingdom }
***@exist-db.org
irc://irc.freenode.net/existdb
Honza Hejzl
2016-02-08 15:44:51 UTC
Permalink
Joe, thanks a lot! It was the mime-type problem, helped immediately, like a
charm.

Many thanks!

Best, Honza
Post by Joe Wicentowski
Hi Honza,
Post by Honza Hejzl
err:XQST0059 error found while loading module app: Module location hint
URI 'app.xql does not refer to an XQuery.
I traced this error code to a series of conditional checks in
XQueryContext.java. Here are the two conditions that could lead to
- if 'app.xql' is not a binary file - namely, if the database thinks
it's an XML document
- if 'app.xql' has a mime type other than 'application/xquery'
There are a few ways to check the xml vs. binary and mimetype status
of 'app.xql', but I'd suggest you open eXide, go to File > Manage,
navigate to the 'app.xql' in question, select it (single-click on the
filename), and select the Properties icon (the icon looks like the
lower case letter "i"). This Properties window shows, among other
things, a file's "Mime" - or mime type. Your file's mime type should
say 'application/xquery'. If not, change it to this value.
The Properties window doesn't explicitly say whether a file is an XML
document or a binary file, but you can test this with XQuery using the
let $resource-uri := '/db/apps/eXide/controller.xql' (: replace
'path-to' with the actual path :)
return
if (util:binary-doc-available($resource-uri)) then
"'" || $resource-uri || "' is a binary file with mime type '"
|| xmldb:get-mime-type($resource-uri) || "'."
else if (doc-available($resource-uri)) then
"'" || $resource-uri || "' is an XML document with mime type
'" || xmldb:get-mime-type($resource-uri) || "'."
else
"'" || $resource-uri || "' was not found. Check the value you
provided for $resource-uri."
Joe
Loading...