The following error message is encountered when parsing XML with SAXParser:
java.lang.arrayindexoutofboundsexception: 100 at Com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.scanLiteral (xmlentityscanner.java:1145) at Com.sun.org.apache.xerces.internal.impl.XMLScanner.scanAttributeValue (xmlscanner.java:996) at Com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanAttribute (Xmlnsdocumentscannerimpl.java : 438) at Com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement ( xmlnsdocumentscannerimpl.java:254) at Com.sun.org.apache.xerces.internal.impl.xmldocumentfragmentscannerimpl$fragmentcontentdriver.next ( xmldocumentfragmentscannerimpl.java:2778) at Com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImPl.next (xmldocumentscannerimpl.java:606) at Com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next (xmlnsdocumentscannerimpl.java:117) at Com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument ( xmldocumentfragmentscannerimpl.java:510) at Com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse (xml11configuration.java:848) at Com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse (xml11configuration.java:777) at com.sun.org.apache.xerces.internal.parsers.xmlparser.parse ( xmlparser.java:141) at Com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse (abstractsaxparser.java:1213) &Nbsp; at com.sun.org.apache.xerces.internal.jaxp.saxparserimpl$jaxpsaxparser.parse ( saxparserimpl.java:649) at Com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse (saxparserimpl.java:333) at javax.xml.parsers.saxparser.parse (saxparser.java:195)    &NBSP, ....
The reason is that there is a bug in the XML parsing in the JDK, there is a tag property with more than 100 newline in the error XML structure, which causes the error as above. I checked the Internet. Someone has already found this problem https://bugs.openjdk.java.net/browse/JDK-8080085
, the issue should have been fixed in the latest JDK8, pending validation.
Workaround: Preprocess The Unmarshal string, replacing multiple newline characters with an empty string
Str.replaceall ("[\n|\r\n]{100,}", "")
java.lang.arrayindexoutofboundsexception:100