Difference between revisions of "XQuery Errors"
m (Reverted edits by CG (talk) to last revision by Lukas.kircher) |
|||
Line 1: | Line 1: | ||
− | This article is part of the [[ | + | This article is part of the [[Querying|Query Portal]]. |
It summarizes all error codes that may be thrown by the BaseX XQuery processor. | It summarizes all error codes that may be thrown by the BaseX XQuery processor. | ||
Line 18: | Line 18: | ||
==BaseX Errors== | ==BaseX Errors== | ||
− | Error Codes: | + | Error Codes: <code>BASX</code> |
{| class="wikitable" width="100%" | {| class="wikitable" width="100%" | ||
Line 25: | Line 25: | ||
! width="35%"|Examples | ! width="35%"|Examples | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
− | |<code> | + | |<code>BASX0001</code> |
− | | | + | | The specified index type is unknown, or not available. |
+ | |<code>db:info("unknown")</code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>BASX0002</code> | ||
+ | | The specified node must reference a database node. | ||
+ | |<code><xml/>/db:text("word")</code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>BASX0003</code> | ||
+ | | The specified database was not found. | ||
+ | |<code>db:open('unknown')</code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>BASX0004</code> | ||
+ | | The database node referenced by a function is out of range. | ||
+ | |<code>db:open-pre('database', -1)</code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>BASX0005</code> | ||
+ | | The current user has no [[User Management|permissions]] to execute an expression. | ||
+ | |<code>file:delete('file.txt')</code>: ''Admin'' rights needed. | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>BASX0006</code> | ||
+ | | The query was timed out. The <code>[[Options#TIMEOUT|TIMEOUT]]</code> option can be modified in the client/server architecture. This error is only raised by the internal BaseX Java function <code>QueryProcess.next(Item)</code>. | ||
| | | | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
− | |<code> | + | |<code>BASX0007</code> |
− | | | + | | Nodes were expected as query result. This error is only raised by the internal BaseX Java function <code>QueryProcessor.queryNodes()</code>. |
− | |<code> | + | | |
+ | |- valign="top" scope="row" | ||
+ | |<code>BASX0008</code> | ||
+ | | A database addressed with the <code>doc()</code> function contains more than one document. | ||
+ | | <code>doc('collection')</code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>BASX0009</code> | ||
+ | | The specified event is unknown. | ||
+ | | <code>db:event('unknown', 'event')</code> | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
− | |<code> | + | |<code>BASX0010</code> |
| The specified database option is unknown. | | The specified database option is unknown. | ||
− | |<code>declare option db:xyz "no"; 1</code> | + | | <code>declare option db:xyz "no"; 1</code> |
+ | |- valign="top" scope="row" | ||
+ | |<code>BASX0011</code> | ||
+ | | The specified XSLT parameter XSLT parameter is unknown. | ||
+ | | <code>xslt:transform('doc.xml', 'input.xslt', '<INVALID/>')</code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>BASX0011</code> | ||
+ | | The specified XSLT parameter XSLT parameter is unknown. | ||
+ | | <code>xslt:transform('doc.xml', 'input.xslt', '<INVALID/>')</code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>BASX0012</code> | ||
+ | | A single document is expected as replace target. | ||
+ | | <code>db:replace('db', 'unknown.xml', '<a/>')</code> | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
− | |<code> | + | |<code>BASX0013</code> |
− | | | + | | An empty rename sting was specified. |
− | |<code> | + | | <code>db:rename('db', 'old.xml', '')</code> |
+ | |- valign="top" scope="row" | ||
+ | |<code>BASX0014</code> | ||
+ | | An error occurred while optimizing the database. | ||
+ | | <code>db:optimize('db')</code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>BASX0015</code> | ||
+ | | The specified input text cannot be parsed as JSON. | ||
+ | | <code>json:parse('{{}}')</code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>BASX0016</code> | ||
+ | | The specified input text cannot be serialized to a JSON document. | ||
+ | | <code>json:serialize(<invalid/>)</code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>BASX0017</code> | ||
+ | | Invalid values were used for fn:partial-apply(). | ||
+ | | <code></code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>BASX0018</code> | ||
+ | | Bytes could not be converted to a string. | ||
+ | | | ||
|} | |} | ||
− | |||
− | |||
==Static Errors== | ==Static Errors== | ||
− | Error Codes: | + | Error Codes: <code>XPST</code>, <code>XQST</code> |
{| class="wikitable" width="100%" | {| class="wikitable" width="100%" | ||
Line 70: | Line 128: | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
|<code>XPST0051</code> | |<code>XPST0051</code> | ||
− | | An unknown QName is used in a ''sequence type'' (e.g. in the target type of the | + | | An unknown QName is used in a ''sequence type'' (e.g. in the target type of the <code>cast</code> expression). |
|<code>1 instance of x<hr/>"test" cast as xs:itr</code> | |<code>1 instance of x<hr/>"test" cast as xs:itr</code> | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
|<code>XPST0080</code> | |<code>XPST0080</code> | ||
− | |<code>xs:NOTATION</code> or | + | | <code>xs:NOTATION</code> or <code>xs:anyAtomicType</code> is used as target type of <code>cast</code> or <code>castable</code>. |
|<code>1 castable as xs:NOTATION</code> | |<code>1 castable as xs:NOTATION</code> | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
Line 188: | Line 246: | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
|<code>XQST0076</code> | |<code>XQST0076</code> | ||
− | | A | + | | A <code>group by</code> or <code>order by</code> clause specifies an unknown collation. |
|<code>for $i in 1 to 10<br/>order by $i collation "unknown"<br/>return $i</code> | |<code>for $i in 1 to 10<br/>order by $i collation "unknown"<br/>return $i</code> | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
Line 209: | Line 267: | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
|<code>XQST0089</code> | |<code>XQST0089</code> | ||
− | | Two variables in a | + | | Two variables in a <code>for</code> or <code>let</code> clause have the same name. |
|<code>for $a at $a in 1 return $i</code> | |<code>for $a at $a in 1 return $i</code> | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
Line 221: | Line 279: | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
|<code>XQST0094</code> | |<code>XQST0094</code> | ||
− | |<code>group by</code> references a variable that has not been declared before. | + | | <code>group by</code> references a variable that has not been declared before. |
|<code>for $a in 1 group by $b return $a</code> | |<code>for $a in 1 group by $b return $a</code> | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
|<code>XQST0097</code> | |<code>XQST0097</code> | ||
− | | A | + | | A <code>decimal-format</code> property is invalid. |
|<code>declare default decimal-format digit = "xxx"; 1</code> | |<code>declare default decimal-format digit = "xxx"; 1</code> | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
|<code>XQST0098</code> | |<code>XQST0098</code> | ||
− | | A single | + | | A single <code>decimal-format</code> character was assigned to multiple properties. |
|<code>declare default decimal-format digit = "%"; 1</code> | |<code>declare default decimal-format digit = "%"; 1</code> | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
Line 267: | Line 325: | ||
==Type Errors== | ==Type Errors== | ||
− | Error Codes: | + | Error Codes: <code>XPTY</code>, <code>XQTY</code> |
{| class="wikitable" width="100%" | {| class="wikitable" width="100%" | ||
Line 295: | Line 353: | ||
==Dynamic Errors== | ==Dynamic Errors== | ||
− | Error Codes: | + | Error Codes: <code>XPDY</code>, <code>XQDY</code> |
{| class="wikitable" width="100%" | {| class="wikitable" width="100%" | ||
Line 307: | Line 365: | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
|<code>XPDY0050</code> | |<code>XPDY0050</code> | ||
− | | • The operand type of a | + | | • The operand type of a <code>treat</code> expression does not match the type of the argument, or<br/>• the root of the context item must be a document node. |
|<code>"string" treat as xs:int<hr/>"string"[/]</code> | |<code>"string" treat as xs:int<hr/>"string"[/]</code> | ||
|- | |- | ||
Line 323: | Line 381: | ||
| The name of a processing instruction is invalid. | | The name of a processing instruction is invalid. | ||
|<code>processing-instruction { "1" } { "" }</code> | |<code>processing-instruction { "1" } { "" }</code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>XQDY0043</code> | ||
+ | | The node name of an attribute uses reserved prefixes or namespaces. | ||
+ | |<code>attribute xmlns { "etc" }</code> | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
|<code>XQDY0064</code> | |<code>XQDY0064</code> | ||
Line 337: | Line 399: | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
|<code>XQDY0095</code> | |<code>XQDY0095</code> | ||
− | | A sequence with more than one item was bound to a | + | | A sequence with more than one item was bound to a <code>group by</code> clause. |
|<code>let $a := (1,2) group by $a return $a</code> | |<code>let $a := (1,2) group by $a return $a</code> | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
Line 347: | Line 409: | ||
==Functions Errors== | ==Functions Errors== | ||
− | Error Codes: | + | Error Codes: <code>FOAR</code>, <code>FOCA</code>, <code>FOCH</code>, <code>FODC</code>, <code>FODF</code>, <code>FODT</code>, <code>FOER</code>, <code>FOFD</code>, <code>FONS</code>, <code>FORG</code>, <code>FORX</code>, <code>FOTY</code>, <code>FOUT</code> |
{| class="wikitable" width="100%" | {| class="wikitable" width="100%" | ||
Line 373: | Line 435: | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
|<code>FOCA0005</code> | |<code>FOCA0005</code> | ||
− | |<code>"NaN"</code> is supplied to duration operations. | + | | <code>"NaN"</code> is supplied to duration operations. |
|<code>xs:yearMonthDuration("P1Y") * xs:double("NaN")</code> | |<code>xs:yearMonthDuration("P1Y") * xs:double("NaN")</code> | ||
|- | |- | ||
Line 393: | Line 455: | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
|<code>FODC0001</code> | |<code>FODC0001</code> | ||
− | | The argument specified in | + | | The argument specified in <code>fn:id()</code> or <code>fn:idref()</code> must have a document node as root. |
|<code>id("id0", <xml/>)</code> | |<code>id("id0", <xml/>)</code> | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
Line 409: | Line 471: | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
|<code>FODC0006</code> | |<code>FODC0006</code> | ||
− | | The string passed to | + | | The string passed to <code>fn:parse-xml()</code> is not well-formed. |
|<code>parse-xml("<x/")</code> | |<code>parse-xml("<x/")</code> | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
|<code>FODC0007</code> | |<code>FODC0007</code> | ||
− | | The base URI passed to | + | | The base URI passed to <code>fn:parse-xml()</code> is invalid. |
|<code>parse-xml("<x/>", ":")</code> | |<code>parse-xml("<x/>", ":")</code> | ||
|- | |- | ||
Line 419: | Line 481: | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
|<code>FODF1280</code> | |<code>FODF1280</code> | ||
− | | The name of the decimal format passed to | + | | The name of the decimal format passed to <code>fn:format-number()</code> is invalid. |
|<code>format-number(1, "0", "invalid")</code> | |<code>format-number(1, "0", "invalid")</code> | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
|<code>FODF1310</code> | |<code>FODF1310</code> | ||
− | | The picture string passed to | + | | The picture string passed to <code>fn:format-number()</code> is invalid. |
|<code>format-number(1, "invalid")</code> | |<code>format-number(1, "invalid")</code> | ||
|- | |- | ||
| colspan=3 style="background-color:white;"| | | colspan=3 style="background-color:white;"| | ||
− | |||
− | |||
− | |||
− | |||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
|<code>FODT0002</code> | |<code>FODT0002</code> | ||
Line 443: | Line 501: | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
|<code>FOER0000</code> | |<code>FOER0000</code> | ||
− | | Error triggered by the | + | | Error triggered by the <code>fn:error()</code> function. |
|<code>error()</code> | |<code>error()</code> | ||
|- | |- | ||
Line 449: | Line 507: | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
|<code>FOFD1340</code> | |<code>FOFD1340</code> | ||
− | | The picture string passed to | + | | The picture string passed to <code>fn:format-date()</code>, <code>fn:format-time()</code> or <code>fn:format-dateTime()</code> is invalid. |
|<code>format-date(current-date(), "[]")</code> | |<code>format-date(current-date(), "[]")</code> | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
|<code>FOFD1350</code> | |<code>FOFD1350</code> | ||
− | | The picture string passed to | + | | The picture string passed to <code>fn:format-date()</code>, <code>fn:format-time()</code> or <code>fn:format-dateTime()</code> specifies an non-available component. |
|<code>format-time(current-time(), "[Y2]")</code> | |<code>format-time(current-time(), "[Y2]")</code> | ||
|- | |- | ||
Line 469: | Line 527: | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
|<code>FORG0002</code> | |<code>FORG0002</code> | ||
− | | The URI passed to | + | | The URI passed to <code>fn:resolve-URI()</code> is invalid. |
|<code>resolve-URI(":")</code> | |<code>resolve-URI(":")</code> | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
|<code>FORG0003</code> | |<code>FORG0003</code> | ||
− | |<code>fn:zero-or-one()</code> was called with more than one item. | + | | <code>fn:zero-or-one()</code> was called with more than one item. |
|<code>zero-or-one((1, 2))</code> | |<code>zero-or-one((1, 2))</code> | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
|<code>FORG0004</code> | |<code>FORG0004</code> | ||
− | |<code>fn:one-or-more()</code> was called with zero items. | + | | <code>fn:one-or-more()</code> was called with zero items. |
|<code>one-or-more(())</code> | |<code>one-or-more(())</code> | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
|<code>FORG0005</code> | |<code>FORG0005</code> | ||
− | |<code>fn:exactly-one()</code> was called with zero or more than one item. | + | | <code>fn:exactly-one()</code> was called with zero or more than one item. |
|<code>exactly-one((1, 2))</code> | |<code>exactly-one((1, 2))</code> | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
Line 489: | Line 547: | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
|<code>FORG0008</code> | |<code>FORG0008</code> | ||
− | | The arguments passed to | + | | The arguments passed to <code>fn:dateTime()</code> have different timezones. |
|<code>dateTime(xs:date("2001-01-01+01:01"), current-time())</code> | |<code>dateTime(xs:date("2001-01-01+01:01"), current-time())</code> | ||
|- | |- | ||
Line 509: | Line 567: | ||
| The replacement string of a regular expression is invalid. | | The replacement string of a regular expression is invalid. | ||
|<code>replace("input", "match", "\")</code> | |<code>replace("input", "match", "\")</code> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
| colspan=3 style="background-color:white;"| | | colspan=3 style="background-color:white;"| | ||
Line 532: | Line 572: | ||
|<code>FOUT1170</code> | |<code>FOUT1170</code> | ||
| Function argument cannot be used to retrieve a text resource. | | Function argument cannot be used to retrieve a text resource. | ||
− | |<code> | + | |<code></code> |
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
− | |<code> | + | |<code>FOUT1170</code> |
| Encoding to retrieve a text resource is invalid or not supported. | | Encoding to retrieve a text resource is invalid or not supported. | ||
|<code>unparsed-text('file.txt', 'InvalidEncoding')</code> | |<code>unparsed-text('file.txt', 'InvalidEncoding')</code> | ||
|} | |} | ||
+ | |||
+ | ....to be added: FOTY0012-0015 | ||
==Serialization Errors== | ==Serialization Errors== | ||
− | Error Codes: | + | Error Codes: <code>SEPM</code>, <code>SERE</code>, <code>SESU</code> |
{| class="wikitable" width="100%" | {| class="wikitable" width="100%" | ||
Line 553: | Line 595: | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
|<code>SEPM0009</code> | |<code>SEPM0009</code> | ||
− | |<code>omit-xml-declaration</code> is set to | + | | <code>omit-xml-declaration</code> is set to <code>yes</code>, and <code>standalone</code> has a value other than <code>omit</code>. |
| | | | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
|<code>SEPM0010</code> | |<code>SEPM0010</code> | ||
− | |<code>method</code> is set to | + | | <code>method</code> is set to <code>xml</code>, <code>undeclare-prefixes</code> is set to <code>yes</code>, and <code>version</code> is set to <code>1.0</code>. |
| | | | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
|<code>SERE0014</code> | |<code>SERE0014</code> | ||
− | |<code>method</code> is set to | + | | <code>method</code> is set to <code>html</code>, and an invalid HTML character is found. |
| | | | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
|<code>SERE0015</code> | |<code>SERE0015</code> | ||
− | |<code>method</code> is set to | + | | <code>method</code> is set to <code>html</code>, and a closing bracket (>) appears inside a processing instruction. |
| | | | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
|<code>SEPM0016</code> | |<code>SEPM0016</code> | ||
| A specified parameter is unknown or has an invalid value. | | A specified parameter is unknown or has an invalid value. | ||
− | |<code>declare option output:indent "nope"; 1</code> | + | | <code>declare option output:indent "nope"; 1</code> |
+ | | | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>SEPM0017</code> | ||
+ | | The definition of serialization parameter is invalid. | ||
| | | | ||
|} | |} | ||
Line 576: | Line 622: | ||
==Update Errors== | ==Update Errors== | ||
− | Error Codes: | + | Error Codes: <code>FOUP</code>, <code>XUDY</code>, <code>XUST</code>, <code>XUTY</code> |
{| class="wikitable" width="100%" | {| class="wikitable" width="100%" | ||
Line 584: | Line 630: | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
|<code>FOUP0001</code> | |<code>FOUP0001</code> | ||
− | | The first argument of | + | | The first argument of <code>fn:put()</code> must be a document node or element. |
|<code>fn:put(text { 1 }, 'file.txt')</code> | |<code>fn:put(text { 1 }, 'file.txt')</code> | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
|<code>FOUP0002</code> | |<code>FOUP0002</code> | ||
− | | The second argument of | + | | The second argument of <code>fn:put()</code> is not a valid URI. |
|<code>fn:put(<a/>, '//')</code> | |<code>fn:put(<a/>, '//')</code> | ||
|- | |- | ||
Line 598: | Line 644: | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
|<code>XUDY0014</code> | |<code>XUDY0014</code> | ||
− | | The expression updated by the | + | | The expression updated by the <code>modify</code> clause was not created by the <code>copy</code> clause. |
|<code>let $a := doc('a') return copy $b := $a modify delete node $a/* return $b</code> | |<code>let $a := doc('a') return copy $b := $a modify delete node $a/* return $b</code> | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
|<code>XUDY0015</code> | |<code>XUDY0015</code> | ||
− | | In a | + | | In a <code>rename</code> expression, a target is renamed more than once. |
|<code>let $a := <xml/> return (rename node $a as 'a', rename node $a as 'b')</code> | |<code>let $a := <xml/> return (rename node $a as 'a', rename node $a as 'b')</code> | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
|<code>XUDY0016</code> | |<code>XUDY0016</code> | ||
− | | In a | + | | In a <code>replace</code> expression, a target is replaced more than once. |
|<code>let $a := <x>x</x>/node() return (replace node $a with <a/>, replace node $a with <b/>)</code> | |<code>let $a := <x>x</x>/node() return (replace node $a with <a/>, replace node $a with <b/>)</code> | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
|<code>XUDY0017</code> | |<code>XUDY0017</code> | ||
− | | In a | + | | In a <code>replace value of</code> expression, a target is replaced more than once. |
|<code>let $a := <x/> return (replace value of node $a with 'a', replace value of node $a with 'a')</code> | |<code>let $a := <x/> return (replace value of node $a with 'a', replace value of node $a with 'a')</code> | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
Line 638: | Line 684: | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
|<code>XUDY0031</code> | |<code>XUDY0031</code> | ||
− | | Multiple calls to | + | | Multiple calls to <code>fn:put()</code> address the same URI. |
|<code>for $i in 1 to 3 return put(<a/>, 'file.txt')</code> | |<code>for $i in 1 to 3 return put(<a/>, 'file.txt')</code> | ||
|- | |- | ||
Line 648: | Line 694: | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
|<code>XUST0002</code> | |<code>XUST0002</code> | ||
− | | An updating expression is expected in the | + | | An updating expression is expected in the <code>modify</code> clause or an updating function. |
|<code>copy $a := <x/> modify 1 return $a</code> | |<code>copy $a := <x/> modify 1 return $a</code> | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
Line 670: | Line 716: | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
|<code>XUTY0005</code> | |<code>XUTY0005</code> | ||
− | | A single element or document node is expected as target of an | + | | A single element or document node is expected as target of an <code>insert</code> expression. |
|<code>insert node <new/> into attribute a { "" }</code> | |<code>insert node <new/> into attribute a { "" }</code> | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
|<code>XUTY0006</code> | |<code>XUTY0006</code> | ||
− | | A single element, text, comment or processing instruction is expected as target of an | + | | A single element, text, comment or processing instruction is expected as target of an <code>insert before/after</code> expression. |
|<code>insert node <new/> after attribute a { "" }</code> | |<code>insert node <new/> after attribute a { "" }</code> | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
Line 682: | Line 728: | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
|<code>XUTY0008</code> | |<code>XUTY0008</code> | ||
− | | A single element, text, attribute, comment or processing instruction is expected as target of a | + | | A single element, text, attribute, comment or processing instruction is expected as target of a <code>replace</code> expression. |
|<code>replace node document { <a/> } with <b/></code> | |<code>replace node document { <a/> } with <b/></code> | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
|<code>XUTY0010</code> | |<code>XUTY0010</code> | ||
− | | In a | + | | In a <code>replace</code> expression, in which no attributes are targeted, the replacing nodes must not be attributes as well. |
|<code>replace node <a><b/></a>/b with attribute size { 1 }</code> | |<code>replace node <a><b/></a>/b with attribute size { 1 }</code> | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
|<code>XUTY0011</code> | |<code>XUTY0011</code> | ||
− | | In the | + | | In the <code>replace</code> expression, in which attributes are targeted, the replacing nodes must be attributes as well. |
|<code>replace node <e a=""/>/@a with <a/></code> | |<code>replace node <e a=""/>/@a with <a/></code> | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
|<code>XUTY0012</code> | |<code>XUTY0012</code> | ||
− | | In a | + | | In a <code>rename</code> expression, the target nodes must be an element, attribute or processing instruction. |
|<code>rename node text { 1 } as <x/></code> | |<code>rename node text { 1 } as <x/></code> | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
|<code>XUTY0013</code> | |<code>XUTY0013</code> | ||
− | | An expression in the | + | | An expression in the <code>copy</code> clause must return a single node. |
|<code>copy $c := (<a/>, <b/>) modify () return $c</code> | |<code>copy $c := (<a/>, <b/>) modify () return $c</code> | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
Line 708: | Line 754: | ||
==Full-Text Errors== | ==Full-Text Errors== | ||
− | Error Codes: | + | Error Codes: <code>FTDY</code>, <code>FTST</code> |
{| class="wikitable" width="100%" | {| class="wikitable" width="100%" | ||
Line 720: | Line 766: | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
|<code>FTDY0017</code> | |<code>FTDY0017</code> | ||
− | | The | + | | The <code>not in</code> operator contains a ''string exclude''. |
|<code>'a' contains text 'a' not in (ftnot 'a')</code> | |<code>'a' contains text 'a' not in (ftnot 'a')</code> | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
Line 728: | Line 774: | ||
|- | |- | ||
| colspan=3 style="background-color:white;"| | | colspan=3 style="background-color:white;"| | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>FTST0000</code> | ||
+ | | BaseX specific: Either wildcard or the [[Full-Text#Fuzzy_Querying|fuzzy option]] can be chosen at the same time. | ||
+ | |<code>'a' contains text 'a' using wildcards using fuzzy</code> | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
|<code>FTST0007</code> | |<code>FTST0007</code> | ||
− | | The full-text expression contains an ignore option (the | + | | The full-text expression contains an ignore option (the <code>ignore option</code> is not supported by BaseX). |
|<code>'a' contains text 'a' without content 'x'</code> | |<code>'a' contains text 'a' without content 'x'</code> | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
Line 746: | Line 796: | ||
|- valign="top" scope="row" | |- valign="top" scope="row" | ||
|<code>FTST0019</code> | |<code>FTST0019</code> | ||
− | | A match option was | + | | A match option was defined more than once. |
|<code>'a' contains text 'a' using stemming using stemming</code> | |<code>'a' contains text 'a' using stemming using stemming</code> | ||
+ | |} | ||
+ | |||
+ | ==[[ZIP Functions]] Errors== | ||
+ | |||
+ | Error Codes: <code>FOZP</code> | ||
+ | |||
+ | {| class="wikitable" width="100%" | ||
+ | ! width="5%"|Code | ||
+ | ! width="50%"|Description | ||
+ | ! width="45%"|Examples | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>FOZP0001</code> | ||
+ | | The specified path does not exist. | ||
+ | |<code>zip:entries('unknown.zip')</code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>FOZP0002</code> | ||
+ | | Entries in the description of a ZIP archive are unknown, missing, or invalid. | ||
+ | |<code>zip:zip-file(<file xmlns="unknown" href='target.zip'/>)</code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>FOZP0003</code> | ||
+ | | ZIP file extraction or creation fails for some other reason (e.g.: new ZIP file contains no entries, or duplicates). | ||
+ | | | ||
+ | |} | ||
+ | |||
+ | ==[[Cryptographic Functions]] Errors== | ||
+ | |||
+ | Error Codes: <code>FOCX</code> | ||
+ | |||
+ | {| class="wikitable" width="100%" | ||
+ | ! width="5%"|Code | ||
+ | ! width="50%"|Description | ||
+ | ! width="45%"|Examples | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>FOCX0001</code> | ||
+ | | Canonicalization algorithm is not supported. | ||
+ | |<code></code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>FOCX0002</code> | ||
+ | | Digest algorithm is not supported. | ||
+ | |<code></code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>FOCX0003</code> | ||
+ | | Signature algorithm is not supported. | ||
+ | |<code></code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>FOCX0004</code> | ||
+ | | XPath expression is invalid. | ||
+ | |<code></code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>FOCX0005</code> | ||
+ | | Invalid name for $digital-certificate root. | ||
+ | |<code></code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>FOCX0006</code> | ||
+ | | Invalid child element of $digital-certificate. | ||
+ | |<code></code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>FOCX0007</code> | ||
+ | | Key store is null. | ||
+ | |<code></code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>FOCX0008</code> | ||
+ | | I/O error while reading keystore. | ||
+ | |<code></code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>FOCX0009</code> | ||
+ | | Permission denied to read keystore. | ||
+ | |<code></code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>FOCX0010</code> | ||
+ | | Keystore URL is invalid. | ||
+ | |<code></code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>FOCX0011</code> | ||
+ | | Keystore type is not supported. | ||
+ | |<code></code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>FOCX0012</code> | ||
+ | | Cannot find key for alias in given keystore. | ||
+ | |<code></code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>FOCX0013</code> | ||
+ | | Hashing algorithm is not supported. | ||
+ | |<code></code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>FOCX0014</code> | ||
+ | | Encoding method is not supported. | ||
+ | |<code></code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>FOCX0015</code> | ||
+ | | Cannot find signature element. | ||
+ | |<code></code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>FOCX0016</code> | ||
+ | | No such padding. | ||
+ | |<code></code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>FOCX0017</code> | ||
+ | | Incorrect padding. | ||
+ | |<code></code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>FOCX0018</code> | ||
+ | | Encryption type is not supported. | ||
+ | |<code></code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>FOCX0019</code> | ||
+ | | Secret key is invalid. | ||
+ | |<code></code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>FOCX0020</code> | ||
+ | | Illegal block size. | ||
+ | |<code></code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>FOCX0021</code> | ||
+ | | Algorithm is not supported. | ||
+ | |<code></code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>FOCX0022</code> | ||
+ | | Decryption type is not supported. | ||
+ | |<code></code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>FOCX9999</code> | ||
+ | | Signature type is not supported. | ||
+ | |<code></code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>FOCX9998</code> | ||
+ | | Not (yet) supported. | ||
+ | |<code></code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>FOCX9997</code> | ||
+ | | Algorithm not compatible with encryption type. | ||
+ | |<code></code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>FOCX9996</code> | ||
+ | | IO Exception. | ||
+ | |<code></code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>FOCX9995</code> | ||
+ | | Keystore exception. | ||
+ | |<code></code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>FOCX9994</code> | ||
+ | | Signature exception. | ||
+ | |<code></code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>FOCX9993</code> | ||
+ | | Invalid algorithm. | ||
+ | |<code></code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>FOCX9992</code> | ||
+ | | Invalid certificate alias. | ||
+ | |<code></code> | ||
+ | |} | ||
+ | |||
+ | ==[[File Functions]] Errors== | ||
+ | |||
+ | Error Codes: <code>FOFL</code> | ||
+ | |||
+ | {| class="wikitable" width="100%" | ||
+ | ! width="5%"|Code | ||
+ | ! width="50%"|Description | ||
+ | ! width="45%"|Examples | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>FOFL0001</code> | ||
+ | | The specified path does not exist. | ||
+ | |<code>file:size('unknown.txt')</code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>FOFL0002</code> | ||
+ | | The specified path does already exist. | ||
+ | |<code>file:create-directory('existing-directory')</code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>FOFL0003</code> | ||
+ | | The specified path does not point to a directory. | ||
+ | |<code>file:list('file.txt')</code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>FOFL0004</code> | ||
+ | | The specified path points to a directory. | ||
+ | |<code>file:read('directory')</code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>FOFL0005</code> | ||
+ | | The specified encoding is not supported. | ||
+ | |<code>file:read('file.txt', 'UTF99')</code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>FOFL9999</code> | ||
+ | | A file operation fails for any other reason. | ||
+ | |<code></code> | ||
+ | |} | ||
+ | |||
+ | ==[[HTTP Functions]] Errors== | ||
+ | |||
+ | Error Codes: <code>FOHC</code> | ||
+ | |||
+ | {| class="wikitable" width="100%" | ||
+ | ! width="5%"|Code | ||
+ | ! width="50%"|Description | ||
+ | ! width="45%"|Examples | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>FOHC0001</code> | ||
+ | | The specified URL is invalid. | ||
+ | |<code></code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>FOHC0002</code> | ||
+ | | The requested method is not valid for HTTP. | ||
+ | |<code></code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>FOHC0004</code> | ||
+ | | The request element is not valid. | ||
+ | |<code></code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>FOHC0005</code> | ||
+ | | An HTTP error occurred. | ||
+ | |<code></code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>FOHC0006</code> | ||
+ | | The provided credentials are invalid. | ||
+ | |<code></code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>FOHC0007</code> | ||
+ | | The HTML input could not be parsed. | ||
+ | |<code></code> | ||
+ | |} | ||
+ | |||
+ | ==[[SQL Functions]] Errors== | ||
+ | |||
+ | Error Codes: <code>FOSQ</code> | ||
+ | |||
+ | {| class="wikitable" width="100%" | ||
+ | ! width="5%"|Code | ||
+ | ! width="50%"|Description | ||
+ | ! width="45%"|Examples | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>FOSQ0001</code> | ||
+ | | An SQL exception occurred. | ||
+ | |<code></code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>FOSQ0002</code> | ||
+ | | No opened connection with the specified id found. | ||
+ | |<code></code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>FOSQ0003</code> | ||
+ | | Number of parameters differs from number of placeholders. | ||
+ | |<code></code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>FOSQ0004</code> | ||
+ | | No parameter type specified. | ||
+ | |<code></code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>FOSQ0005</code> | ||
+ | | An unexpected attribute was found. | ||
+ | |<code></code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>FOSQ0006</code> | ||
+ | | The specified format is illegal. | ||
+ | |<code></code> | ||
+ | |- valign="top" scope="row" | ||
+ | |<code>FOSQ0007</code> | ||
+ | | The JDBC driver cannot be initialized. | ||
+ | |<code></code> | ||
|} | |} | ||
[[Category:XQuery]] | [[Category:XQuery]] |
Revision as of 05:27, 23 August 2012
This article is part of the Query Portal. It summarizes all error codes that may be thrown by the BaseX XQuery processor.
As the original specifications are rather bulky and meticulous, we tried our best to make this overview comprehensible to a wider range of readers. The following tables list the error codes that are known to BaseX, a short description, and examples of queries raising that errors.
Original definitions of the error codes are found in the XQuery 3.0, XQuery 3.0 Functions, XQuery 1.0 Update, XQuery 1.0 Full Text, and EXPath HTTP Specifications.
Contents
BaseX Errors
Error Codes: BASX
Code | Description | Examples |
---|---|---|
BASX0001
|
The specified index type is unknown, or not available. | db:info("unknown")
|
BASX0002
|
The specified node must reference a database node. | <xml/>/db:text("word")
|
BASX0003
|
The specified database was not found. | db:open('unknown')
|
BASX0004
|
The database node referenced by a function is out of range. | db:open-pre('database', -1)
|
BASX0005
|
The current user has no permissions to execute an expression. | file:delete('file.txt') : Admin rights needed.
|
BASX0006
|
The query was timed out. The TIMEOUT option can be modified in the client/server architecture. This error is only raised by the internal BaseX Java function QueryProcess.next(Item) .
|
|
BASX0007
|
Nodes were expected as query result. This error is only raised by the internal BaseX Java function QueryProcessor.queryNodes() .
|
|
BASX0008
|
A database addressed with the doc() function contains more than one document.
|
doc('collection')
|
BASX0009
|
The specified event is unknown. | db:event('unknown', 'event')
|
BASX0010
|
The specified database option is unknown. | declare option db:xyz "no"; 1
|
BASX0011
|
The specified XSLT parameter XSLT parameter is unknown. | xslt:transform('doc.xml', 'input.xslt', '<INVALID/>')
|
BASX0011
|
The specified XSLT parameter XSLT parameter is unknown. | xslt:transform('doc.xml', 'input.xslt', '<INVALID/>')
|
BASX0012
|
A single document is expected as replace target. | db:replace('db', 'unknown.xml', '<a/>')
|
BASX0013
|
An empty rename sting was specified. | db:rename('db', 'old.xml', )
|
BASX0014
|
An error occurred while optimizing the database. | db:optimize('db')
|
BASX0015
|
The specified input text cannot be parsed as JSON. | json:parse('{{}}')
|
BASX0016
|
The specified input text cannot be serialized to a JSON document. | json:serialize(<invalid/>)
|
BASX0017
|
Invalid values were used for fn:partial-apply(). |
|
BASX0018
|
Bytes could not be converted to a string. |
Static Errors
Error Codes: XPST
, XQST
Code | Description | Examples |
---|---|---|
XPST0003
|
An error occurred while parsing the query string (i.e., before the query could be compiled and executed). This error is the most common one, and may be accompanied by a variety of different error messages. | 1+
|
XPST0005
|
An expression will never results, no matter what input will be processed. | doc('input')/..
|
XPST0008
|
A variable or type name is used that has not been defined in the current scope. | $a---
|
XPST0017
|
• The specified function is unknown, or • it uses the wrong number of arguments. |
unknown()
|
XPST0051
|
An unknown QName is used in a sequence type (e.g. in the target type of the cast expression).
|
1 instance of x
|
XPST0080
|
xs:NOTATION or xs:anyAtomicType is used as target type of cast or castable .
|
1 castable as xs:NOTATION
|
XPST0081
|
• A QName uses a prefix that has not been bound to any namespace, or • a pragma or option declaration has not been prefixed. |
unknown:x
|
XQST0009
|
The query imports a schema (schema import is not supported by BaseX). | import schema "x"; ()
|
XQST0022
|
Namespace values must be constant strings. | <elem xmlns="{ 'dynamic' }"/>
|
XQST0031
|
The specified XQuery version is not specified. | xquery version "9.9"; ()
|
XQST0032
|
The base URI was declared more than once. | declare base-uri ...
|
XQST0033
|
A namespace prefix was declared more than once. | declare namespace a="a";
|
XQST0034
|
A function was declared more than once. | declare function local:a() { 1 };
|
XQST0038
|
The default collation was declared more than once. | declare default collation ...
|
XQST0039
|
Two or more parameters in a user-defined function have the same name. | declare function local:fun($a, $a) { $a * $a };
|
XQDY0040
|
Two or more attributes in an element have the same node name. | <elem a="1" a="12"/>
|
XQDY0045
|
A user-defined function uses a reserved namespace. | declare function fn:fun() { 1 }; ()
|
XQST0047
|
A module was defined more than once. | import module ...
|
XQST0048
|
A module declaration does not match the namespace of the specified module. | import module namespace invalid="uri"; 1
|
XQST0049
|
A global variable was declared more than once. | declare variable $a := 1;
|
XQST0054
|
A global variable depends on itself. This may be triggered by a circular variable definition. | declare variable $a := local:a();
|
XQST0055
|
The mode for copying namespaces was declared more than once. | declare copy-namespaces ...
|
XQST0057
|
The namespace of a schema import may not be empty. | import schema ""; ()
|
XQST0059
|
The schema or module with the specified namespace cannot be found or processed. | import module "unknown"; ()
|
XQST0060
|
A user-defined function has no namespace. | declare default function namespace "";
|
XQST0065
|
The ordering mode was declared more than once. | declare ordering ...
|
XQST0065
|
The default namespace mode for elements or functions was declared more than once. | declare default element namespace ...
|
XQST0067
|
The construction mode was declared more than once. | declare construction ...
|
XQST0068
|
The mode for handling boundary spaces was declared more than once. | declare boundary-space ...
|
XQST0069
|
The default order for empty sequences was declared more than once. | declare default order empty ...
|
XQST0070
|
A namespace declaration overwrites a reserved namespace. | declare namespace xml=""; ()
|
XQST0071
|
A namespace is declared more than once in an element constructor. | <a xmlns="uri1" xmlns="uri2"/>
|
XQST0075
|
The query contains a validate expression (validation is not supported by BaseX). | validate strict { () }
|
XQST0076
|
A group by or order by clause specifies an unknown collation.
|
for $i in 1 to 10
|
XQST0079
|
A pragma was specified without the expression that is to be evaluated. | (# xml:a #) {}
|
XQST0085
|
An empty namespace URI was specified. | <pref:elem xmlns:pref=""/>
|
XQST0087
|
An unknown encoding was specified. Note that the encoding declaration is currently ignored in BaseX. | xquery version "1.0" encoding "a b"; ()
|
XQST0088
|
An empty module namespace was specified. | import module ""; ()
|
XQST0089
|
Two variables in a for or let clause have the same name.
|
for $a at $a in 1 return $i
|
XQST0090
|
A character reference specifies an invalid character. | "�"
|
XQST0093
|
A module depends on itself. This may be triggered by a circular module definition. | import module ...
|
XQST0094
|
group by references a variable that has not been declared before.
|
for $a in 1 group by $b return $a
|
XQST0097
|
A decimal-format property is invalid.
|
declare default decimal-format digit = "xxx"; 1
|
XQST0098
|
A single decimal-format character was assigned to multiple properties.
|
declare default decimal-format digit = "%"; 1
|
XQST0099
|
The context item was declared more than once. | declare context item ...
|
XQST0107
|
The initializer of the context item depends on itself. | declare context item := .; ()
|
XQST0108
|
Output declarations may only be specified in the main module. | Module: declare output ...
|
XQST0109
|
The specified serialization parameter is unknown. | declare option output:unknown "..."; 1
|
XQST0110
|
A serialization parameter was specified more than once in the output declarations. | declare option output:indent "no";
|
XQST0111
|
A decimal format was declared more than once. | declare decimal-format ...
|
XQST0113
|
Context item values may only be in the main module. | Module: declare context item := 1;
|
XQST0114
|
A decimal-format property has been specified more than once. | declare decimal-format EN NaN="!" NaN="?"; ()
|
Type Errors
Error Codes: XPTY
, XQTY
Code | Description | Examples |
---|---|---|
XPTY0004
|
This error is raised if an expression has the wrong type, or cannot be cast into the specified type. It may be raised both statically (during query compilation) or dynamically (at runtime). | 1 + "A"
|
XPTY0018
|
The result of the last step in a path expression contains both nodes and atomic values. | doc('input.xml')/(*, 1)
|
XPTY0019
|
The result of a step (other than the last step) in a path expression contains an atomic values. | (1 to 10)/*
|
XQTY0024
|
An attribute node cannot be bound to its parent element, as other nodes of a different type were specified before. | <elem>text { attribute a { "val" } }</elem>
|
Dynamic Errors
Error Codes: XPDY
, XQDY
Code | Description | Examples |
---|---|---|
XPDY0002
|
• No value has been defined for an external variable, or • no context item has been set before the query was executed. |
declare variable $x external; $x
|
XPDY0050
|
• The operand type of a treat expression does not match the type of the argument, or• the root of the context item must be a document node. |
"string" treat as xs:int
|
XQDY0025
|
Two or more attributes in a constructed element have the same node name. | element x { attribute a { "" } attribute a { "" } }
|
XQDY0026
|
The content of a computed processing instruction contains "?>". | processing-instruction pi { "?>" }
|
XQDY0041
|
The name of a processing instruction is invalid. | processing-instruction { "1" } { "" }
|
XQDY0043
|
The node name of an attribute uses reserved prefixes or namespaces. | attribute xmlns { "etc" }
|
XQDY0064
|
The name of a processing instruction equals "XML" (case insensitive). | processing-instruction xml { "etc" }
|
XQDY0072
|
The content of a computed comment contains "--" or ends with "-". | comment { "one -- two" }
|
XQDY0074
|
The name of a computed attribute or element is invalid, or uses an unbound prefix. | element { "x y" } { "" }
|
XQDY0095
|
A sequence with more than one item was bound to a group by clause.
|
let $a := (1,2) group by $a return $a
|
XQDY0096
|
The node name of an element uses reserved prefixes or namespaces. | element { QName("uri", "xml:n") } {}
|
Functions Errors
Error Codes: FOAR
, FOCA
, FOCH
, FODC
, FODF
, FODT
, FOER
, FOFD
, FONS
, FORG
, FORX
, FOTY
, FOUT
Code | Description | Examples |
---|---|---|
FOAR0001
|
A value was divided by zero. | 1 div 0
|
FOAR0002
|
A numeric declaration or operation causes an over- or underflow. | 12345678901234567890
|
FOCA0002
|
• A float number cannot be converted to a decimal or integer value, or • a function argument cannot be converted to a valid QName. |
xs:int(xs:double("INF"))
|
FOCA0003
|
A value is too large to be represented as integer. | xs:integer(99e100)
|
FOCA0005
|
"NaN" is supplied to duration operations.
|
xs:yearMonthDuration("P1Y") * xs:double("NaN")
|
FOCH0001
|
A codepoint was specified that does not represent a valid XML character. | codepoints-to-string(0)
|
FOCH0002
|
A unsupported collation was specified in a function. | compare('a', 'a', 'unknown')
|
FOCH0003
|
A unsupported normalization form was specified in a function. | normalize-unicode('a', 'unknown')
|
FODC0001
|
The argument specified in fn:id() or fn:idref() must have a document node as root.
|
id("id0", <xml/>)
|
FODC0002
|
The specified document resource cannot be retrieved. | doc("unknown.xml")
|
FODC0004
|
The specified collection cannot be retrieved. | collection("unknown")
|
FODC0005
|
The specified URI to a document resource is invalid. | doc("<xml/>")
|
FODC0006
|
The string passed to fn:parse-xml() is not well-formed.
|
parse-xml("<x/")
|
FODC0007
|
The base URI passed to fn:parse-xml() is invalid.
|
parse-xml("<x/>", ":")
|
FODF1280
|
The name of the decimal format passed to fn:format-number() is invalid.
|
format-number(1, "0", "invalid")
|
FODF1310
|
The picture string passed to fn:format-number() is invalid.
|
format-number(1, "invalid")
|
FODT0002
|
A duration declaration or operation causes an over- or underflow. | implicit-timezone() div 0
|
FODT0003
|
An invalid timezone was specified. | adjust-time-to-timezone(xs:time("01:01:01"), xs:dayTimeDuration("PT20H"))
|
FOER0000
|
Error triggered by the fn:error() function.
|
error()
|
FOFD1340
|
The picture string passed to fn:format-date() , fn:format-time() or fn:format-dateTime() is invalid.
|
format-date(current-date(), "[]")
|
FOFD1350
|
The picture string passed to fn:format-date() , fn:format-time() or fn:format-dateTime() specifies an non-available component.
|
format-time(current-time(), "[Y2]")
|
FONS0004
|
A function has a QName as argument that specifies an unbound prefix. | resolve-QName("x:e", <e/>)
|
FORG0001
|
A value cannot be cast to the required target type. | xs:integer("A")
|
FORG0002
|
The URI passed to fn:resolve-URI() is invalid.
|
resolve-URI(":")
|
FORG0003
|
fn:zero-or-one() was called with more than one item.
|
zero-or-one((1, 2))
|
FORG0004
|
fn:one-or-more() was called with zero items.
|
one-or-more(())
|
FORG0005
|
fn:exactly-one() was called with zero or more than one item.
|
exactly-one((1, 2))
|
FORG0006
|
A wrong argument type was specified in a function call. | sum((1, "string"))
|
FORG0008
|
The arguments passed to fn:dateTime() have different timezones.
|
dateTime(xs:date("2001-01-01+01:01"), current-time())
|
FORX0001
|
A function specifies an invalid regular expression flag. | matches('input', 'query', 'invalid')
|
FORX0002
|
A function specifies an invalid regular expression. | matches('input', '[')
|
FORX0003
|
A regular expression matches an empty string. | tokenize('input', '.?')
|
FORX0004
|
The replacement string of a regular expression is invalid. | replace("input", "match", "\")
|
FOUT1170
|
Function argument cannot be used to retrieve a text resource. |
|
FOUT1170
|
Encoding to retrieve a text resource is invalid or not supported. | unparsed-text('file.txt', 'InvalidEncoding')
|
....to be added: FOTY0012-0015
Serialization Errors
Error Codes: SEPM
, SERE
, SESU
Code | Description | Examples | |
---|---|---|---|
SESU0007
|
The specified encoding is not supported. | declare option output:encoding "xyz"; 1
| |
SEPM0009
|
omit-xml-declaration is set to yes , and standalone has a value other than omit .
|
||
SEPM0010
|
method is set to xml , undeclare-prefixes is set to yes , and version is set to 1.0 .
|
||
SERE0014
|
method is set to html , and an invalid HTML character is found.
|
||
SERE0015
|
method is set to html , and a closing bracket (>) appears inside a processing instruction.
|
||
SEPM0016
|
A specified parameter is unknown or has an invalid value. | declare option output:indent "nope"; 1
|
|
SEPM0017
|
The definition of serialization parameter is invalid. |
Update Errors
Error Codes: FOUP
, XUDY
, XUST
, XUTY
Code | Description | Examples |
---|---|---|
FOUP0001
|
The first argument of fn:put() must be a document node or element.
|
fn:put(text { 1 }, 'file.txt')
|
FOUP0002
|
The second argument of fn:put() is not a valid URI.
|
fn:put(<a/>, '//')
|
XUDY0009
|
The target node of a replace expression needs a parent in order to be replaced. | replace node <target/> with <new/>
|
XUDY0014
|
The expression updated by the modify clause was not created by the copy clause.
|
let $a := doc('a') return copy $b := $a modify delete node $a/* return $b
|
XUDY0015
|
In a rename expression, a target is renamed more than once.
|
let $a := <xml/> return (rename node $a as 'a', rename node $a as 'b')
|
XUDY0016
|
In a replace expression, a target is replaced more than once.
|
let $a := <x>x</x>/node() return (replace node $a with <a/>, replace node $a with )
|
XUDY0017
|
In a replace value of expression, a target is replaced more than once.
|
let $a := <x/> return (replace value of node $a with 'a', replace value of node $a with 'a')
|
XUDY0021
|
The resulting update expression contains duplicate attributes. | copy $c := <x a='a'/> modify insert node attribute a {""} into $c return $c
|
XUDY0023
|
The resulting update expression conflicts with existing namespaces. | rename node <a:ns xmlns:a='uri'/> as QName('URI', 'a:ns')
|
XUDY0024
|
New namespaces conflict with each other. | copy $n := <x/> modify (insert node attribute { QName('uri1', 'a') } { "" } into $n, insert node attribute { QName('uri2', 'a') } { "" } into $n) return $n
|
XUDY0027
|
Target of an update expression is an empty sequence. | insert node <x/> into ()
|
XUDY0029
|
The target of an update expression has no parent node. | insert node <new/> before <target/>
|
XUDY0030
|
Attributes cannot be inserted before or after the child of a document node. | insert node <e a='a'/>/@a after document { <e/> }/*
|
XUDY0031
|
Multiple calls to fn:put() address the same URI.
|
for $i in 1 to 3 return put(<a/>, 'file.txt')
|
XUST0001
|
No updating expression is allowed here. | delete node /, "finished."
|
XUST0002
|
An updating expression is expected in the modify clause or an updating function.
|
copy $a := <x/> modify 1 return $a
|
XUST0003
|
The revalidation mode was declared more than once. | declare revalidation ...
|
XUST0026
|
The query contains a revalidate expression (revalidation is not supported by BaseX). | declare revalidation ...
|
XUST0028
|
no return type may be specified in an updating function. | declare updating function local:x() as item() { () }; ()
|
XUTY0004
|
New attributes to be inserted must directly follow the root node. | insert node (<a/>, attribute a {""}) into <a/>
|
XUTY0005
|
A single element or document node is expected as target of an insert expression.
|
insert node <new/> into attribute a { "" }
|
XUTY0006
|
A single element, text, comment or processing instruction is expected as target of an insert before/after expression.
|
insert node <new/> after attribute a { "" }
|
XUTY0007
|
Only nodes can be deleted. | delete node "string"
|
XUTY0008
|
A single element, text, attribute, comment or processing instruction is expected as target of a replace expression.
|
replace node document { <a/> } with
|
XUTY0010
|
In a replace expression, in which no attributes are targeted, the replacing nodes must not be attributes as well.
|
replace node <a></a>/b with attribute size { 1 }
|
XUTY0011
|
In the replace expression, in which attributes are targeted, the replacing nodes must be attributes as well.
|
replace node <e a=""/>/@a with <a/>
|
XUTY0012
|
In a rename expression, the target nodes must be an element, attribute or processing instruction.
|
rename node text { 1 } as <x/>
|
XUTY0013
|
An expression in the copy clause must return a single node.
|
copy $c := (<a/>, ) modify () return $c
|
XUTY0022
|
An attribute must not be inserted into a document node. | insert node <e a=""/>/@a into document {'a'}
|
Full-Text Errors
Error Codes: FTDY
, FTST
Code | Description | Examples |
---|---|---|
FTDY0016
|
The specified weight value is out of range. | 'a' contains text 'a' weight { 1001 }
|
FTDY0017
|
The not in operator contains a string exclude.
|
'a' contains text 'a' not in (ftnot 'a')
|
FTDY0020
|
The search term uses an invalid wildcard syntax. | 'a' contains text '.{}' using wildcards
|
FTST0000
|
BaseX specific: Either wildcard or the fuzzy option can be chosen at the same time. | 'a' contains text 'a' using wildcards using fuzzy
|
FTST0007
|
The full-text expression contains an ignore option (the ignore option is not supported by BaseX).
|
'a' contains text 'a' without content 'x'
|
FTST0008
|
The specified stop word file could not be opened or processed. | 'a' contains text 'a' using stop words at 'unknown.txt'
|
FTST0009
|
The specified language is not supported. | 'a' contains text 'a' using language 'aaa'
|
FTST0018
|
The specified thesaurus file could not be opened or processed. | 'a' contains text 'a' using thesaurus at 'aaa'
|
FTST0019
|
A match option was defined more than once. | 'a' contains text 'a' using stemming using stemming
|
ZIP Functions Errors
Error Codes: FOZP
Code | Description | Examples |
---|---|---|
FOZP0001
|
The specified path does not exist. | zip:entries('unknown.zip')
|
FOZP0002
|
Entries in the description of a ZIP archive are unknown, missing, or invalid. | zip:zip-file(<file xmlns="unknown" href='target.zip'/>)
|
FOZP0003
|
ZIP file extraction or creation fails for some other reason (e.g.: new ZIP file contains no entries, or duplicates). |
Cryptographic Functions Errors
Error Codes: FOCX
Code | Description | Examples |
---|---|---|
FOCX0001
|
Canonicalization algorithm is not supported. |
|
FOCX0002
|
Digest algorithm is not supported. |
|
FOCX0003
|
Signature algorithm is not supported. |
|
FOCX0004
|
XPath expression is invalid. |
|
FOCX0005
|
Invalid name for $digital-certificate root. |
|
FOCX0006
|
Invalid child element of $digital-certificate. |
|
FOCX0007
|
Key store is null. |
|
FOCX0008
|
I/O error while reading keystore. |
|
FOCX0009
|
Permission denied to read keystore. |
|
FOCX0010
|
Keystore URL is invalid. |
|
FOCX0011
|
Keystore type is not supported. |
|
FOCX0012
|
Cannot find key for alias in given keystore. |
|
FOCX0013
|
Hashing algorithm is not supported. |
|
FOCX0014
|
Encoding method is not supported. |
|
FOCX0015
|
Cannot find signature element. |
|
FOCX0016
|
No such padding. |
|
FOCX0017
|
Incorrect padding. |
|
FOCX0018
|
Encryption type is not supported. |
|
FOCX0019
|
Secret key is invalid. |
|
FOCX0020
|
Illegal block size. |
|
FOCX0021
|
Algorithm is not supported. |
|
FOCX0022
|
Decryption type is not supported. |
|
FOCX9999
|
Signature type is not supported. |
|
FOCX9998
|
Not (yet) supported. |
|
FOCX9997
|
Algorithm not compatible with encryption type. |
|
FOCX9996
|
IO Exception. |
|
FOCX9995
|
Keystore exception. |
|
FOCX9994
|
Signature exception. |
|
FOCX9993
|
Invalid algorithm. |
|
FOCX9992
|
Invalid certificate alias. |
|
File Functions Errors
Error Codes: FOFL
Code | Description | Examples |
---|---|---|
FOFL0001
|
The specified path does not exist. | file:size('unknown.txt')
|
FOFL0002
|
The specified path does already exist. | file:create-directory('existing-directory')
|
FOFL0003
|
The specified path does not point to a directory. | file:list('file.txt')
|
FOFL0004
|
The specified path points to a directory. | file:read('directory')
|
FOFL0005
|
The specified encoding is not supported. | file:read('file.txt', 'UTF99')
|
FOFL9999
|
A file operation fails for any other reason. |
|
HTTP Functions Errors
Error Codes: FOHC
Code | Description | Examples |
---|---|---|
FOHC0001
|
The specified URL is invalid. |
|
FOHC0002
|
The requested method is not valid for HTTP. |
|
FOHC0004
|
The request element is not valid. |
|
FOHC0005
|
An HTTP error occurred. |
|
FOHC0006
|
The provided credentials are invalid. |
|
FOHC0007
|
The HTML input could not be parsed. |
|
SQL Functions Errors
Error Codes: FOSQ
Code | Description | Examples |
---|---|---|
FOSQ0001
|
An SQL exception occurred. |
|
FOSQ0002
|
No opened connection with the specified id found. |
|
FOSQ0003
|
Number of parameters differs from number of placeholders. |
|
FOSQ0004
|
No parameter type specified. |
|
FOSQ0005
|
An unexpected attribute was found. |
|
FOSQ0006
|
The specified format is illegal. |
|
FOSQ0007
|
The JDBC driver cannot be initialized. |
|