FOP
  1. FOP
  2. FOP-1448

IndexOutOfBoundsException error

    Details

    • Type: Bug Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: 0.94
    • Fix Version/s: None
    • Component/s: renderer/pdf
    • Labels:
      None
    • Environment:
      Operating System: Windows XP
      Platform: PC
    • External issue ID:
      43803

      Description

      Small fo file will be attached. Using default fop.xconf .

      Exception:

      Nov 7, 2007 11:21:37 AM org.apache.fop.cli.Main startFOP
      SEVERE: Exception
      java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
      at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:168)
      at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
      at org.apache.fop.cli.Main.startFOP(Main.java:166)
      at org.apache.fop.cli.Main.main(Main.java:197)

      1. failed.fo
        2 kB
        Jon Wong
      2. test.fo
        18 kB
        Jon Wong

        Activity

        Hide
        Jon Wong added a comment -

        Attachment test.fo has been added with description: Small fo file that produces the error

        Show
        Jon Wong added a comment - Attachment test.fo has been added with description: Small fo file that produces the error
        Hide
        Jon Wong added a comment -

        Full error log:

        java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
        at java.util.ArrayList.RangeCheck(Unknown Source)
        at java.util.ArrayList.get(Unknown Source)
        at
        org.apache.fop.layoutmgr.table.TableContentLayoutManager.iterateAndPaintPositions(TableContentLayoutManager.java:727)
        at
        org.apache.fop.layoutmgr.table.TableContentLayoutManager.addAreas(TableContentLayoutManager.java:694)
        at
        org.apache.fop.layoutmgr.table.TableLayoutManager.addAreas(TableLayoutManager.java:334)
        at
        org.apache.fop.layoutmgr.BlockLayoutManager.addAreas(BlockLayoutManager.java:393)
        at org.apache.fop.layoutmgr.AreaAdditionUtil.addAreas(AreaAdditionUtil.java:118)
        at org.apache.fop.layoutmgr.FlowLayoutManager.addAreas(FlowLayoutManager.java:297)
        at org.apache.fop.layoutmgr.PageBreaker.addAreas(PageBreaker.java:241)
        at org.apache.fop.layoutmgr.AbstractBreaker.addAreas(AbstractBreaker.java:507)
        at org.apache.fop.layoutmgr.AbstractBreaker.addAreas(AbstractBreaker.java:370)
        at org.apache.fop.layoutmgr.PageBreaker.doPhase3(PageBreaker.java:262)
        at org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:345)
        at org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:263)
        at
        org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:144)
        at org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:233)
        at org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:145)
        at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:378)
        at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:194)
        at
        org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerIdentityImpl.java:1101)
        at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
        at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
        at
        org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
        Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
        Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at
        org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484)
        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:165)
        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
        at org.apache.fop.cli.Main.startFOP(Main.java:166)
        at org.apache.fop.cli.Main.main(Main.java:197)

        Show
        Jon Wong added a comment - Full error log: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.RangeCheck(Unknown Source) at java.util.ArrayList.get(Unknown Source) at org.apache.fop.layoutmgr.table.TableContentLayoutManager.iterateAndPaintPositions(TableContentLayoutManager.java:727) at org.apache.fop.layoutmgr.table.TableContentLayoutManager.addAreas(TableContentLayoutManager.java:694) at org.apache.fop.layoutmgr.table.TableLayoutManager.addAreas(TableLayoutManager.java:334) at org.apache.fop.layoutmgr.BlockLayoutManager.addAreas(BlockLayoutManager.java:393) at org.apache.fop.layoutmgr.AreaAdditionUtil.addAreas(AreaAdditionUtil.java:118) at org.apache.fop.layoutmgr.FlowLayoutManager.addAreas(FlowLayoutManager.java:297) at org.apache.fop.layoutmgr.PageBreaker.addAreas(PageBreaker.java:241) at org.apache.fop.layoutmgr.AbstractBreaker.addAreas(AbstractBreaker.java:507) at org.apache.fop.layoutmgr.AbstractBreaker.addAreas(AbstractBreaker.java:370) at org.apache.fop.layoutmgr.PageBreaker.doPhase3(PageBreaker.java:262) at org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:345) at org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:263) at org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:144) at org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:233) at org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:145) at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:378) at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:194) at org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerIdentityImpl.java:1101) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484) at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:165) at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115) at org.apache.fop.cli.Main.startFOP(Main.java:166) at org.apache.fop.cli.Main.main(Main.java:197)
        Hide
        Jon Wong added a comment -

        Note line 33, "<fo:table-cell padding-bottom=".5em"/>". If I simply add
        "<fo:block>something</fo:block>" into that table cell, it all works fine.

        Show
        Jon Wong added a comment - Note line 33, "<fo:table-cell padding-bottom=".5em"/>". If I simply add "<fo:block>something</fo:block>" into that table cell, it all works fine.
        Hide
        Jon Wong added a comment -

        Attachment failed.fo has been added with description: An even smaller fo file to produce error

        Show
        Jon Wong added a comment - Attachment failed.fo has been added with description: An even smaller fo file to produce error
        Hide
        Vincent Hennebert added a comment -

        Your FO file isn't valid, an fo:table-cell must not be empty. Launching FOP 0.94
        on it gave me a ValidationException, as expected. Are you sure you uploaded the
        right file(s)?
        OTOH, this may very probably be a manifestation of FOP-1446.
        I'm closing this bug, please re-open it if you feel necessary.

        Vincent

        Show
        Vincent Hennebert added a comment - Your FO file isn't valid, an fo:table-cell must not be empty. Launching FOP 0.94 on it gave me a ValidationException, as expected. Are you sure you uploaded the right file(s)? OTOH, this may very probably be a manifestation of FOP-1446 . I'm closing this bug, please re-open it if you feel necessary. Vincent
        Hide
        Jeremias Maerki added a comment -

        Well, FOP versions until 0.93 nicely handled empty table-cells if relaxed
        validation was enabled. I'd love to see that restored.

        Show
        Jeremias Maerki added a comment - Well, FOP versions until 0.93 nicely handled empty table-cells if relaxed validation was enabled. I'd love to see that restored.
        Hide
        Vincent Hennebert added a comment -

        Sorry, I completely forgot about that relaxed validation mode. This should be
        fixed in revision 596776.

        Show
        Vincent Hennebert added a comment - Sorry, I completely forgot about that relaxed validation mode. This should be fixed in revision 596776.
        Hide
        Glenn Adams added a comment -

        batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed

        Show
        Glenn Adams added a comment - batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed

          People

          • Assignee:
            fop-dev
            Reporter:
            Jon Wong
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development