Running with the following file, I got the following exception : [java] java.lang.ArrayIndexOutOfBoundsException [java] at org.apache.fop.fo.flow.TableRow$CellArray.getNextFreeCell(Unknown Source) [java] at org.apache.fop.fo.flow.TableRow.initCellArray(Unknown Source) [java] at org.apache.fop.fo.flow.TableRow.layout(Unknown Source) [java] at org.apache.fop.fo.flow.TableBody.layout(Unknown Source) [java] at org.apache.fop.fo.flow.Table.layout(Unknown Source) [java] at org.apache.fop.fo.flow.Flow.layout(Unknown Source) [java] at org.apache.fop.fo.flow.Flow.layout(Unknown Source) [java] at org.apache.fop.fo.pagination.PageSequence.format(Unknown Source) [java] at org.apache.fop.apps.StreamRenderer.render(Unknown Source) [java] at org.apache.fop.fo.FOTreeBuilder.endElement(Unknown Source) [java] at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) [java] at org.apache.xerces.impl.XMLNamespaceBinder.handleEndElement(Unknown Source) [java] at org.apache.xerces.impl.XMLNamespaceBinder.endElement(Unknown Source) [java] at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown Source) [java] at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown Source) [java] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.handleEndElement(Unknown Source) [java] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source) [java] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) [java] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) [java] at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) [java] at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) [java] at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) [java] at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) [java] at org.apache.fop.apps.Driver.render(Unknown Source) [java] at org.apache.fop.apps.CommandLineStarter.run(Unknown Source) [java] at org.apache.fop.apps.Fop.main(Unknown Source)
Created attachment 2795 [details] Output of ant
Created attachment 2797 [details] The fo file that cause the exception
I get an identical exception. It appears to be related to setting the number- rows-spanned property.
More information - I only get the exception when using Driver.getContentHandler () as the target of Transformer.transform. If I save the output of the transformer to a byte stream and then feed a byte stream into the Driver all is well.
The second table has 9 rows, the last row has 8 cells, two of which span 3 and 2 columns, respectively. FOP can't deal graciously with the second last cell which overflows the available columns. I'll put a slightly better error message in, but processing will terminate nevertheless. Correct the source.
*** Bug 21806 has been marked as a duplicate of this bug. ***
batch transition to closed remaining pre-FOP1.0 resolved bugs