Errors
Format
Any errors are reported in an ErrorReport containing a message and errors with a list of error elements. Several categories of error reports are reported together based on the time of failures. Various categories are as follows:
I/O exceptions,
Cases where the config file violates the schema and
Compile time XPath validation.
Runtime error - Run time XPath validation and comparison exceptions.
IO Errors
<ErrorReport>
<message>IO Errors</message>
<errors>
<error>inputA: cannot read /persona.xml</error>
<error/>
<error>configuration: cannot read /config.xml</error>
</errors>
</ErrorReport>
Configuration file Validation
<ErrorReport>
<message>Invalid configuration</message>
<errors>
<error>Invalid content was found starting with element 'dcf:child-alignment1'. One of '{"com.deltaxml.data.config":child-alignment}' is expected.</error>
<error>unexpected element (uri:"com.deltaxml.data.config", local:"child-alignment1"). Expected elements are <{com.deltaxml.data.config}child-alignment></error>
</errors>
</ErrorReport>
Xpath Errors
<ErrorReport>
<message>Invalid configuration</message>
<errors>
<error>XPath Error (code: XPST0003) : Unexpected token ")" at start of expression at: /dcf:configuration/dcf:location[@name='Address config']/@xpath with XPath: /persons/person[@customerid='2']/address*</error>
<error>XPath Error (code: XPST0003) : Unexpected token "<eof>" at start of expression at: /dcf:configuration/dcf:location[@name='Unordered persons']/@xpath with XPath: /persons*</error>
</errors>
</ErrorReport>
Diagnostics Mode
By default, the diagnosticsMode is set to true. When a diagnosticsMode is set to true, then more precise information about the runtime XPath errors along with a location in the configuration file is available. We recommend that you disable diagnosticsMode after the development phase in order to improve performance.
diagnosticsMode = true
<ErrorReport>
<note>This report was generated with diagnostics on. We recommend you to disable diagnosticsMode after the development phase in order to improve performance.</note>
<message>Runtime XPath Error</message>
<errors>
<error>XPath Error (code: XPTY0004) : A sequence of more than one item is not allowed as the first argument of fn:substring() ("", "FKHGT") at: /dcf:configuration/dcf:location[@name='unordered-1']/dcf:child-order/dcf:child-alignment/@child-xpath with XPath: ITEM[substring(.//text(), 3) eq 'test']</error>
</errors>
</ErrorReport>
diagnosticsMode = false
<ErrorReport>
<note>This report was generated with diagnostics off. Enable the diagnosticsMode before running for more precise details.</note>
<message>Runtime XPath Error</message>
<errors>
<error>[inputA: configuration-markup-template XPath Error (code: XPTY0004) : A sequence of more than one item is not allowed as the first argument of fn:substring() ("", "FKHGT")
An error occurred matching pattern {element(Q{http://schemas.example.com/dbi/fsl/compliance/v1_0}ITEM)[(substring(zero-or-one(convertUntyped(data(descendant::text()))), 3)) eq "test"]}: , inputA: configuration-markup-template XPath Error (code: XPTY0004) : A sequence of more than one item is not allowed as the first argument of fn:substring() ("", "P4V68")
An error occurred matching pattern {element(Q{http://schemas.example.com/dbi/fsl/compliance/v1_0}ITEM)[(substring(zero-or-one(convertUntyped(data(descendant::text()))), 3)) eq "test"]}: , inputA: configuration-markup-template XPath Error (code: XPTY0004) : A sequence of more than one item is not allowed as the first argument of fn:substring() ("", "DG8M3")
An error occurred matching pattern {element(Q{http://schemas.example.com/dbi/fsl/compliance/v1_0}ITEM)[(substring(zero-or-one(convertUntyped(data(descendant::text()))), 3)) eq "test"]}: , inputA: configuration-markup-template XPath Error (code: XPTY0004) : A sequence of more than one item is not allowed as the first argument of fn:substring() ("", "09NK2")
An error occurred matching pattern {element(Q{http://schemas.example.com/dbi/fsl/compliance/v1_0}ITEM)[(substring(zero-or-one(convertUntyped(data(descendant::text()))), 3)) eq "test"]}: , inputA: configuration-markup-template XPath Error (code: XPTY0004) : A sequence of more than one item is not allowed as the first argument of fn:substring() ("", "2YHG7")
An error occurred matching pattern {element(Q{http://schemas.example.com/dbi/fsl/compliance/v1_0}ITEM)[(substring(zero-or-one(convertUntyped(data(descendant::text()))), 3)) eq "test"]}:]</error>
</errors>
</ErrorReport>