Explanation of JAXB error: Invalid byte 1 of 1-byte UTF-8 sequence
Posted
by Marcus
on Stack Overflow
See other posts from Stack Overflow
or by Marcus
Published on 2010-06-14T18:51:18Z
Indexed on
2010/06/14
19:12 UTC
Read the original article
Hit count: 417
We're parsing an XML document using JAXB and get this error:
[org.xml.sax.SAXParseException: Invalid byte 1 of 1-byte UTF-8 sequence.]
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.createUnmarshalException(AbstractUnmarshallerImpl.java:315)
What exactly does this mean and how can we resolve this??
We are executing the code as:
jaxbContext = JAXBContext.newInstance(Results.class);
Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
unmarshaller.setSchema(getSchema());
results = (Results) unmarshaller.unmarshal(new FileInputStream(inputFile));
Update
Issue appears to be due to this "funny" character in the XML file: ¿
Why would this cause such a problem??
© Stack Overflow or respective owner