Page 1 of 1

Error Messages from DB2 XQuery

Posted: Fri Mar 23, 2007 5:44 pm
by dmccreary
Hi,

oXygen is working great for editing eXist and DB2 XQueries.

One problem I am having with DB2 is getting readable error messages back to the Eclipse Error panel of oXygen. Here is a simple XQuery with a missing semicolon in the let statement. (it should be let foo := 'bar'

Code: Select all

let $foo = 'bar'
return
<root>
{$foo}
</root>
Here is the error message:

[
SystemID:
Severity: error
Line:-1
Column:-1
EndLine:-1
EndColumn:-1
Length:0
Offset:-1
Message:com.ibm.db2.jcc.c.SqlException: DB2 SQL error: SQLCODE: -16002, SQLSTATE: 10505, SQLERRMC: =;n "1.0";

let $foo;:=]
Note that there is a good hint but the line, column and other data is wrong.

Is this a problem with DB2 not returning good error messages of did I not configure oXyen correctly? Is there any way to get better error messages? This would make debugging long XQueries much easier.

Thanks - Dan

Posted: Mon Mar 26, 2007 11:11 am
by sorin_ristache
Hello,

The JDBC driver for DB2 does not report the line and column of the error. It does not depend on how you configure the connection to the DB2 server. The error support must be improved in the DB2 driver in order to display the location in the error message in oXygen.


Regards,
Sorin