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

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,

The persistence_2_0.xsd enforces the order of the elements in the xml. Re-ordering them makes then error go away.

Solutions on the web

via openxava by samialsayyed
, 1 year ago
Invalid byte 2 of 2-byte UTF-8 sequence.
via openbravo by naveenchanda
, 1 year ago
Invalid byte 2 of 3-byte UTF-8 sequence.
via Oracle Community by 843834, 1 year ago
Invalid byte 1 of 1-byte UTF-8 sequence.
via Atlassian JIRA by Ajay Sridhar [Atlassian], 1 year ago
Premature end of file.
via Oracle Community by 772876, 1 year ago
Premature end of file.
via Atlassian JIRA by Ajay Sridhar [Atlassian], 1 year ago
Premature end of file.
org.xml.sax.SAXParseException: Invalid byte 2 of 2-byte UTF-8 sequence.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.dom4j.io.SAXReader.read(SAXReader.java:465)
at org.dom4j.io.SAXReader.read(SAXReader.java:264)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
2 times, 1 year ago
Once, 10 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.