Details
-
Bug
-
Status: Closed
-
Resolution: Fixed
-
0.95
-
None
-
None
-
Operating System: Linux
Platform: PC
-
50471
Description
We want to create a PDF using FOP. We used XSL and XML files to transform to create PDF. The xml file contains Greek Extended character and its decimal code is 8062 and its Hex code is 1F7E and its HTML representation is .
The moment this character is discovered in the string then the transformer.transform method throws TransformerException which actually was caused due to ArrayIndexOutofBoundsException.
The exact Exception Stack trace is as per below.
We tried decoding the FOP code and we could not understand the array lineBreakProperties defined in LineBreakUtils.
Please help us in getting the way out of this exception.
Base Exception in PDFGenerator.buildPdf() Error in Creating PDF
at PDFTest.buildPdf(PDFTest.java:140)
at PDFTest.main(PDFTest.java:50)
Caused by: javax.xml.transform.TransformerException: java.lang.ArrayIndexOutOfBoundsException: -1
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(Unknown Source)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(Unknown Source)
at PDFTest.buildPdf(PDFTest.java:118)
... 1 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
at org.apache.fop.text.linebreak.LineBreakUtils.getLineBreakPairProperty(LineBreakUtils.java:668)
at org.apache.fop.text.linebreak.LineBreakStatus.nextChar(LineBreakStatus.java:117)
at org.apache.fop.layoutmgr.inline.TextLayoutManager.getNextKnuthElements(TextLayoutManager.java:543)
at org.apache.fop.layoutmgr.inline.LineLayoutManager.collectInlineKnuthElements(LineLayoutManager.java:658)
at org.apache.fop.layoutmgr.inline.LineLayoutManager.getNextKnuthElements(LineLayoutManager.java:594)
at org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:294)
at org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:116)
at org.apache.fop.layoutmgr.table.TableCellLayoutManager.getNextKnuthElements(TableCellLayoutManager.java:170)
at org.apache.fop.layoutmgr.table.RowGroupLayoutManager.createElementsForRowGroup(RowGroupLayoutManager.java:120)
at org.apache.fop.layoutmgr.table.RowGroupLayoutManager.getNextKnuthElements(RowGroupLayoutManager.java:60)
at org.apache.fop.layoutmgr.table.TableContentLayoutManager.getKnuthElementsForRowIterator(TableContentLayoutManager.java:228)
at org.apache.fop.layoutmgr.table.TableContentLayoutManager.getNextKnuthElements(TableContentLayoutManager.java:172)
at org.apache.fop.layoutmgr.table.TableLayoutManager.getNextKnuthElements(TableLayoutManager.java:247)
at org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:294)
at org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:116)
at org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:294)
at org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:116)
at org.apache.fop.layoutmgr.FlowLayoutManager.getNextKnuthElements(FlowLayoutManager.java:107)
at org.apache.fop.layoutmgr.PageBreaker.getNextKnuthElements(PageBreaker.java:145)
at org.apache.fop.layoutmgr.AbstractBreaker.getNextBlockList(AbstractBreaker.java:552)
at org.apache.fop.layoutmgr.PageBreaker.getNextBlockList(PageBreaker.java:137)
at org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:302)Stop...s
at org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:264)
at org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:106)
at org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:234)
at org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:123)
at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:340)
at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:169)
at com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler.endElement(Unknown Source)
at com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler.endElement(Unknown Source)
at GregorSamsa.template$dot$0()
at GregorSamsa.applyTemplates()
at GregorSamsa.transform()
at com.sun.org.apache.xalan.internal.xsltc.runtime.AbstractTranslet.transform(Unknown Source)