org.xml.sax.SAXParseException: Invalid byte 2 of 3-byte UTF-8 sequence

java, saxparser, webmethods, xml-parsing

Solution

The most likely scenario is that the file is ISO-8859-1 encoded and contains extended ASCII (characters between 0x80 and 0xff inclusive). The parser is expecting UTF-8 and one of the extended characters is being interpreted as the start of a 3-byte sequence, but is not followed by a byte that is valid in that position.

Problem

I am encountering the above error in production environment whereas the process went fine in UAT. I was wondering whether this error is related to jar file loading. We are using webmethods and the above error occurred for a java service.

Original source

Related problems