Diagnostics File

If the invalid records violate the schema and contain invalid characters, all the invalid records and their line numbers are created in a file in the specified error directory. The diagnostics file provides useful information for users to correct the invalid records and then republish them.

The following file is an example of an input file containing invalid records (marked in bold):
OrderX, ID41678, <10Apr2000
Item, GigaWidget, 60, $75
Item, MegaBucket, 48, $60
Customer, Hopkins Associates, ID36800
Order, ID41680, 20May2000
ItemX, Rt.Clopper, >40, $50
Item, Lt.Clopper, 50, $100
Customer, JerseyWebInovaters, ID46786

The schema diagnostics file has the format of an XML file and has a .xml extension, so it can be opened and viewed in a text editor as well as in an Internet browser. However, when the invalid records contain special XML characters, a diagnostics file might not be deemed as a well-formed XML file and cannot be opened in an Internet browser.

Note: The XML specification states that characters ‘&’, ‘<’, and ‘>’ are special characters, and these special characters must be replaced by strings “&amp;”, “&lt;”, and “&gt;” respectively when they are displayed in a certain part of an XML document.
When invalid records containing special XML characters are written to the diagnostics file without proper conversion, the diagnostics file is not a well-formed XML file. However, the adapter provides three different formats for users to choose from for the diagnostics file:
  • Plain text file
  • XML file without special character conversion
  • XML file with special character conversion

If you use TIBCO Administrator to deploy and run the adapter, you can create an adfiles.schemaDiagnosticsFileFormat module property and use it to specify the desired format for the diagnostics file. The three valid values for the module property are xml (default), xmlconv, and text for the three different available formats for the diagnostics file “XML without special character conversion”, “XML with special character conversion”, and “plain text”.

For users who run the adapter by configuring or using the .tra file directly, they can add the adfiles.schemaDiagnosticsFileFormat property to the .tra file and specify the desired format for the diagnostics file. The three valid values for the module property are xml (default), xmlconv, and text for the three different available formats for the diagnostics file “XML without special character conversion”, “XML with special character conversion”, and “plain text”.