Error Handling in Record Transfer Mode
Error Handling provides a convenient way of analyzing the parsing errors in Record Transfer mode.
Publication Service
When Publication Service detects a parsing error that violates the predefined schema, an XML file containing the name of the input file and the error details is created. To use this feature, you must specify a valid directory in the Error Directory field in the Processing tab.
H D
H field_1 String (Header) field_2 ui4 D field_1 String (Detail) field_2 ui4
Header, -10 Detail, 20 Header, 30 Detail, 40 Header, 50 Detail, 60
<?xml version="1.0" encoding="UTF-8" ?> - <file name="input.txt20030917151048000"> - <errorObjects> - <object> <contents>Header, -10 </contents> <location startLine="1" endLine="1" startOffset="0" endOffset="11" /> <error>Header record contains invalid data field: Header, -10 [-10]</error> </object> </errorObjects>
The XML file contains the name of the input file and an object element for each error. Each object element contains details such as the entire identified object, location of the object in the file, and error details. The input file that has parsing errors is kept for analysis. The location and name depend on the postprocessing option specified in the Processing tab. If the input file is abc.txt, the following list describes the name and location based on various postprocessing options that are available:
Subscription Service
- If an error occurs when Subscription Service is writing a file in the wip directory, Subscription Service does not confirm the message, it prints an error log and exits by default. When you set the adfiles.io.sub.exit4issue property to OFF, Subscription Service prints an error log, confirms the message, and then continues to receive other messages.
- If an error occurs when Subscription Service is moving the transfer file from the working directory to the output directory, and the error directory is specified, the adapter moves the file to the error directory and Subscription Service exits by default. When you set the adfiles.io.sub.exit4issue property to OFF, Subscription Service does not exit.
- When IO errors occur in Subscription Service, Subscription Service exits by default. If Publication Service continues to send messages using the Durable EMS transport or the Certified RV transport, Subscription Service resubscribes the remaining messages from the transport when restarted.
When an IO error occurs, whether the data format of a message is Business document (MBusinessDocument) or Object (MInstance), Subscription Service handles the IO error in the same way.