Here’s an issue we had encountered while running a BI Publisher report – that was supposed to be generated via an Application Engine. Provided below is the error message that was written to the log file.
Caused by: java.io.UTFDataFormatException: Invalid UTF8 encoding. at oracle.xdo11g.parser.v2.XMLUTF8Reader.checkUTF8Byte(XMLUTF8Reader.java:160) at oracle.xdo11g.parser.v2.XMLUTF8Reader.readUTF8Char(XMLUTF8Reader.java:187) at oracle.xdo11g.parser.v2.XMLUTF8Reader.fillBuffer(XMLUTF8Reader.java:120) at oracle.xdo11g.parser.v2.XMLByteReader.saveBuffer(XMLByteReader.java:450) at oracle.xdo11g.parser.v2.XMLReader.fillBuffer(XMLReader.java:2566) at oracle.xdo11g.parser.v2.XMLReader.scanChars(XMLReader.java:1645) at oracle.xdo11g.parser.v2.NonValidatingParser.parseText(NonValidatingParser.java:1451) at oracle.xdo11g.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1338) at oracle.xdo11g.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:366) at oracle.xdo11g.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:312) at oracle.xdo11g.parser.v2.XMLParser.parse(XMLParser.java:311) ... 12 more Dec 09, 2016 3:07:32 PM oracle.xdo.template.FOProcessor SEVERE: End Memory: max=512MB, total=17MB, free=3MB PeopleTools 8.53.06 - Application Engine Copyright (c) 1988-2016 Oracle and/or its affiliates. All Rights Reserved
The SEVERE: End Memory: max=512MB, total=17MB, free=3MB error is kinda misleading and is far from an actual memory issue. Investigating further, we found out that the issue was being caused by some French characters, just because the XML file that was generated by the Application Engine was not UTF8 encoded.
The fix was to use UTF8 encoding while writing the XML file – here’s a sample code snippet:
&File = GetFile(&sFile, "W", "UTF8", %FilePath_Absolute);
Meanwhile, as a workaround, we had to determine what data was causing the AE to fail, and we followed the steps provided below for the same:
- Copy paste the generated XML file in Notepad++ (available in Remote desktop)
- Do a Find (Ctrl + F)
- Choose Regular Expression as the Search Mode
- In the Find field, enter the regular expression which would return any non-ASCII characters within the file [^\x00-\x7F]+
Thanks to this blog for the wonderful tip! 🙂
Happy reading everyone! 🙂
Hope this helps!