Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Posts: 23
Registered: ‎08-02-2008
My Device: BlackBerry Dev Alpha
My Carrier: Bharti Airtel

BlackBerry 7.1 - xml parsing - entity expansion limit "64000"

[ Edited ]

Hi All


I came across a issue where wile parsing a huge xml returned from server. I get the following SAXException. Which is working fine in Blackerry OS versions below 7.1.


"The parser has encountered more than "64,000" entity expansions in this document; this is the limit imposed by the application"


Searching through forums I found that we can set the entity expansion limit in normal java by

using command line

-DentityExpansionLimit=100000, or by

                 SAXParserFactory spf = SAXParserFactory.newInstance();

using system property



There is one API setFeature(String name, boolean value) of org.xml.sax.XMLReader

by which I thought it can be a workaround, but didn't find any.


If anyone has got any idea of how this can be fixed, please share.