FOP
  1. FOP
  2. FOP-1746

ClassCastException when using fox:widow-content-limit

    Details

    • Type: Bug Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: trunk
    • Fix Version/s: None
    • Component/s: layout/unqualified
    • Labels:
      None
    • Environment:
      Operating System: Windows Vista
      Platform: PC
    • External issue ID:
      48380

      Description

      I created a table with the fox:widow-content-limit attribute. If a table cell contains a list-block element, which has the space-after attribute, a ClassCastException occurs.

      A small testcase is attached.

      Stacktrace:
      11.12.2009 17:30:13 org.apache.fop.cli.Main startFOP
      SCHWERWIEGEND: Exception
      java.lang.ClassCastException: org.apache.fop.layoutmgr.SpaceElement
      at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:302)
      at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
      at org.apache.fop.cli.Main.startFOP(Main.java:174)
      at org.apache.fop.cli.Main.main(Main.java:205)
      Caused by: java.lang.ClassCastException: org.apache.fop.layoutmgr.SpaceElement
      at org.apache.fop.layoutmgr.ElementListUtils.removeLegalBreaks(ElementListUtils.java:87)
      at org.apache.fop.layoutmgr.list.ListBlockLayoutManager.getNextKnuthElements(ListBlockLayoutManager.java:125)
      at org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextChildElements(BlockStackingLayoutManager.java:571)
      at org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextChildElements(BlockStackingLayoutManager.java:552)
      at org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:280)
      at org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:123)
      at org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:115)
      at org.apache.fop.layoutmgr.table.TableCellLayoutManager.getNextKnuthElements(TableCellLayoutManager.java:154)
      at org.apache.fop.layoutmgr.table.RowGroupLayoutManager.createElementsForRowGroup(RowGroupLayoutManager.java:118)
      at org.apache.fop.layoutmgr.table.RowGroupLayoutManager.getNextKnuthElements(RowGroupLayoutManager.java:61)
      at org.apache.fop.layoutmgr.table.TableContentLayoutManager.getKnuthElementsForRowIterator(TableContentLayoutManager.java:220)
      at org.apache.fop.layoutmgr.table.TableContentLayoutManager.getNextKnuthElements(TableContentLayoutManager.java:173)
      at org.apache.fop.layoutmgr.table.TableLayoutManager.getNextKnuthElements(TableLayoutManager.java:249)
      at org.apache.fop.layoutmgr.FlowLayoutManager.getNextChildElements(FlowLayoutManager.java:199)
      at org.apache.fop.layoutmgr.FlowLayoutManager.addChildElements(FlowLayoutManager.java:140)
      at org.apache.fop.layoutmgr.FlowLayoutManager.addChildElements(FlowLayoutManager.java:129)
      at org.apache.fop.layoutmgr.FlowLayoutManager.getNextKnuthElements(FlowLayoutManager.java:70)
      at org.apache.fop.layoutmgr.PageBreaker.getNextKnuthElements(PageBreaker.java:216)
      at org.apache.fop.layoutmgr.AbstractBreaker.getNextBlockList(AbstractBreaker.java:697)
      at org.apache.fop.layoutmgr.PageBreaker.getNextBlockList(PageBreaker.java:149)
      at org.apache.fop.layoutmgr.PageBreaker.getNextBlockList(PageBreaker.java:132)
      at org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:341)
      at org.apache.fop.layoutmgr.PageBreaker.doLayout(PageBreaker.java:85)
      at org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:107)
      at org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:238)
      at org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:120)
      at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:349)
      at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:177)
      at org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerIdentityImpl.java:1101)
      at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
      at org.apache.xerces.xinclude.XIncludeHandler.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.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
      at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484)
      at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:299)
      ... 3 more

      ---------

      java.lang.ClassCastException: org.apache.fop.layoutmgr.SpaceElement
      at org.apache.fop.layoutmgr.ElementListUtils.removeLegalBreaks(ElementListUtils.java:87)
      at org.apache.fop.layoutmgr.list.ListBlockLayoutManager.getNextKnuthElements(ListBlockLayoutManager.java:125)
      at org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextChildElements(BlockStackingLayoutManager.java:571)
      at org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextChildElements(BlockStackingLayoutManager.java:552)
      at org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:280)
      at org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:123)
      at org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:115)
      at org.apache.fop.layoutmgr.table.TableCellLayoutManager.getNextKnuthElements(TableCellLayoutManager.java:154)
      at org.apache.fop.layoutmgr.table.RowGroupLayoutManager.createElementsForRowGroup(RowGroupLayoutManager.java:118)
      at org.apache.fop.layoutmgr.table.RowGroupLayoutManager.getNextKnuthElements(RowGroupLayoutManager.java:61)
      at org.apache.fop.layoutmgr.table.TableContentLayoutManager.getKnuthElementsForRowIterator(TableContentLayoutManager.java:220)
      at org.apache.fop.layoutmgr.table.TableContentLayoutManager.getNextKnuthElements(TableContentLayoutManager.java:173)
      at org.apache.fop.layoutmgr.table.TableLayoutManager.getNextKnuthElements(TableLayoutManager.java:249)
      at org.apache.fop.layoutmgr.FlowLayoutManager.getNextChildElements(FlowLayoutManager.java:199)
      at org.apache.fop.layoutmgr.FlowLayoutManager.addChildElements(FlowLayoutManager.java:140)
      at org.apache.fop.layoutmgr.FlowLayoutManager.addChildElements(FlowLayoutManager.java:129)
      at org.apache.fop.layoutmgr.FlowLayoutManager.getNextKnuthElements(FlowLayoutManager.java:70)
      at org.apache.fop.layoutmgr.PageBreaker.getNextKnuthElements(PageBreaker.java:216)
      at org.apache.fop.layoutmgr.AbstractBreaker.getNextBlockList(AbstractBreaker.java:697)
      at org.apache.fop.layoutmgr.PageBreaker.getNextBlockList(PageBreaker.java:149)
      at org.apache.fop.layoutmgr.PageBreaker.getNextBlockList(PageBreaker.java:132)
      at org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:341)
      at org.apache.fop.layoutmgr.PageBreaker.doLayout(PageBreaker.java:85)
      at org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:107)
      at org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:238)
      at org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:120)
      at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:349)
      at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:177)
      at org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerIdentityImpl.java:1101)
      at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
      at org.apache.xerces.xinclude.XIncludeHandler.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.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
      at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484)
      at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:299)
      at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
      at org.apache.fop.cli.Main.startFOP(Main.java:174)
      at org.apache.fop.cli.Main.main(Main.java:205)

      1. table_fox-widow-content-limit_bug.fo
        1 kB
        Matthias Reischenbacher
      2. b48380.diff
        5 kB
        Andreas L. Delmelle

        Activity

        No work has yet been logged on this issue.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development