Support Article
File Listener fails to parse XML file
SA-9998
Summary
File Listener fails to parse the XML file.
Error Messages
2015-05-04 22:15:48,201 [j2ee14_ws,maxpri=10]] [ STANDARD] [ ] ( mapping.xml.XMLParserBase) ERROR File.|process|||- Caught exception parsing XML stream
Steps to Reproduce
1. Create a new file listener configuration by running the wizard.
2. Start the file listener through the SMA.
3. Place and XML file in the folder path.
4. Listener picks up the file and fails to parse the XML content of the file.
Root Cause
The root cause of this problem is a defect in customer application code/rules. The XMLfile that FileListener was reading from was missing key mappings for "xml version" and "encoding". If these attributes are missing, a XML file is treated as byte order marked, causing parse failure.
Resolution
Add following entry at the start of the XML file:
<?xml version="1.0" encoding="UTF-8"?>
Published June 12, 2015 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.