ArrayIndexOutOfBoundsException: 2048+ items breaks the bank
843834Apr 14 2005 — edited Apr 15 2005I'm using xalan to process a large tabular xml file (10000 "rows").
The xml is in the format:
/H/R/D00... Dnn
To provide a simple table structure with rows and cells. In this case we have five columns (D00 to D04).
I'm running the transformation and sending the html output straight back to the browser.
I have a template that matches R which turns the D cells into table cells.
The trouble is, the transformation breaks after 2046 rows. I get the 2046 rows returned to the screen and then an exception.
If I add an xsl:if test="position() < 2047" clause inside the R template (only process that row if that row is less than row number 2047) then the transformation runs fine. I just don't get all my data.
The root cause looks to be an ArrayIndexOutOfBoundsException (-2048).
Have I run up against some kind of limit? Is there a known workaround? Have I explained the problem sufficiently?
I've not seen this before, and I have been processing some large xml files.
Any help gratefully received.
Mark