obtaining complete error messages

Having trouble installing Oxygen? Got a bug to report? Post it all here.
bernardusgui
Posts: 20
Joined: Thu Oct 18, 2018 11:45 am

obtaining complete error messages

Post by bernardusgui »

In eXist-db 5 I am using XEP for PDF creation. Everything works fine on my local instance, but on the production server the identical code is not functioning. This could be linked to a number of configuration issues, but I can't identify which. As such, I am depending on the error message to help me.

In Oxygen (22.1, build 2020061102) it says: "Description: exerr:ERROR Error. [at line 46, column 12]". When I open the error message in Oxygen, I only get half of the details (see below) which ends with "...16 more".

My question is: is it possible to have Oxygen output the complete error message? If not, is Oxygen receiving this error from eXist directly? or is it reading from a log? In the case of the latter, I cannot find this error in any of the eXist logs and wonder how Oxygen has obtained these details.

Thanks very much.

Code: Select all

org.xmldb.api.base.XMLDBException: exerr:ERROR Error. [at line 46, column 12]
	at org.exist.xmldb.RemoteXPathQueryService.throwException(RemoteXPathQueryService.java:164)
	at org.exist.xmldb.RemoteXPathQueryService.query(RemoteXPathQueryService.java:108)
	at org.exist.xmldb.RemoteXPathQueryService.query(RemoteXPathQueryService.java:78)
	at org.exist.xmldb.RemoteXPathQueryService.execute(RemoteXPathQueryService.java:326)
	at ro.sync.db.nxd.exist.ExistSession$_c.d(Unknown Source)
	at ro.sync.db.nxd.exist.ExistSession.ld(Unknown Source)
	at ro.sync.db.nxd.exist.ExistSession.evaluateXQueryAsResultSet(Unknown Source)
	at ro.sync.xml.transformer.d.f.h(Unknown Source)
	at ro.sync.xml.transformer.d.f.transform(Unknown Source)
	at ro.sync.xml.transformer.d.n.transform(Unknown Source)
	at ro.sync.xml.transformer.bb.transform(Unknown Source)
	at ro.sync.exml.editor.xmleditor.hc.shh(Unknown Source)
	at ro.sync.exml.editor.xmleditor.hc.dhh(Unknown Source)
	at ro.sync.exml.editor.xmleditor.hc.tih(Unknown Source)
	at ro.sync.exml.editor.xmleditor.hc.wgh(Unknown Source)
	at ro.sync.exml.editor.xmleditor.hc$4.lre(Unknown Source)
	at ro.sync.ui.application.lb.run(Unknown Source)
Caused by: org.exist.xquery.XPathException: exerr:ERROR exerr:ERROR Error. [at line 46, column 12] [at line 46, column 12]
	at org.exist.xmldb.RemoteXPathQueryService.throwException(RemoteXPathQueryService.java:163)
	... 16 more
Radu
Posts: 9044
Joined: Fri Jul 09, 2004 5:18 pm

Re: obtaining complete error messages

Post by Radu »

Hi,

Looking at the exception stack trace, Oxygen's Java code (with the "ro.sync.db.nxd" packages) at some point calls the Exist client side API to execute an XQuery:

Code: Select all

	at org.exist.xmldb.RemoteXPathQueryService.execute(RemoteXPathQueryService.java:326)
	at ro.sync.db.nxd.exist.ExistSession$_c.d(Unknown Source)


then a Java exception is thrown in the Exist code:

Code: Select all

at org.exist.xmldb.RemoteXPathQueryService.throwException(RemoteXPathQueryService.java:164)
Oxygen uses the "printStackTrace()" method on that exception that is caught in the Oxygen code to print the contents that you have found.
That "... 16 more" part is not a truncation of the error message done by Oxygen, the Java printStackTrace() method is documented here:
https://docs.oracle.com/javase/1.5.0/do ... ackTrace()
Note the presence of lines containing the characters "...". These lines indicate that the remainder of the stack trace for this exception matches the indicated number of frames from the bottom of the stack trace of the exception that was caused by this exception (the "enclosing" exception). This shorthand can greatly reduce the length of the output in the common case where a wrapped exception is thrown from same method as the "causative exception" is caught.
so that "... 16 more" part is caused by the fact that the Exist client side Java API wraps an XPathException inside an "XMLDBException" and they both share the same stack trace.

You can look at line 164 in the Java code if you want:

https://github.com/eXist-db/exist/blob/ ... rvice.java

Both exceptions are created there probably based on a reply they get from the server side API. I do not know where to find details about this on the server side, maybe you can ask on the Exist users list.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply