Issue –> Got the below error when file adapter parses an xml using utf-8 ecoding
summary=<summary>Exception occurred when binding was invoked.
Exception occurred during invocation of JCA binding: “JCA Binding execute of Reference operation ‘SynchRead’ failed due to: Error while translating.
Error occurred while translating content from file <file>
Please make sure that the file content conforms to the schema. Make necessary changes to the file content or the schema.
The invoked JCA adapter raised a resource exception.
Please examine the above error message carefully to determine a resolution.
,detail=<detail>Start of root element expected.</detail>}>
Cause –> This is due to the adapter trying to read the XML file as UTF-8. The file was edited using Notepad which saves files as UTF-8 with BOM (Byte Order Mark) even though it doesn’t show the BOM in the Notepad window.
To resolve this issue, several approaches may be taken:
1. If wanting to use input files encoded without BOM:
A. Use a superior file editor (such as Notepad++) to save the input file. This allows the user to save files as “Encode in UTF-8” or “Encode in UTF-8-BOM”.
2. If wanting to use input files encoded with BOM or using Notepad to save files encoded with UTF-8:
A. The native schema information needs to be added and set to “true” in the input schema.