xmlgraphics-fop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sam Barker (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FOP-2364) Keep-with-next integer value: Illegal value for breakClass: 75
Date Wed, 06 Apr 2016 03:23:25 GMT

    [ https://issues.apache.org/jira/browse/FOP-2364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15227645#comment-15227645
] 

Sam Barker commented on FOP-2364:
---------------------------------

I've just tried to upgrade from FOP 1.1 to to FOP2.1 and am tripping up on what I believe
to be this issue. 

        We are getting this stack trace:
        {code}
        Caused by:java.lang.IllegalArgumentException:Illegal value for breakClass:75
        at org.apache.fop.util.BreakUtil.getBreakClassPriority(BreakUtil.java:39)
        at org.apache.fop.util.BreakUtil.compareBreakClasses(BreakUtil.java:58)
        at org.apache.fop.layoutmgr.list.ListItemLayoutManager.getCombinedKnuthElementsForListItem(ListItemLayoutManager.java:413)
        at org.apache.fop.layoutmgr.list.ListItemLayoutManager.getNextKnuthElements(ListItemLayoutManager.java:326)
        at org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:239)
        at org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextChildElements(BlockStackingLayoutManager.java:498)
        at org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:289)
        at org.apache.fop.layoutmgr.list.ListBlockLayoutManager.getNextKnuthElements(ListBlockLayoutManager.java:103)
        at org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:239)
        at org.apache.fop.layoutmgr.BlockLayoutManager.getNextChildElements(BlockLayoutManager.java:141)
        at org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:289)
        at org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:113)
        at org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:105)
        at org.apache.fop.layoutmgr.BlockLayoutManager.getNextChildElements(BlockLayoutManager.java:141)
        at org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:289)
        at org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:113)
        at org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:105)
        at org.apache.fop.layoutmgr.BlockLayoutManager.getNextChildElements(BlockLayoutManager.java:141)
        at org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:289)
        at org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:113)
        at org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:105)
        at org.apache.fop.layoutmgr.BlockLayoutManager.getNextChildElements(BlockLayoutManager.java:141)
        at org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:289)
        at org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:113)
        at org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:105)
        at org.apache.fop.layoutmgr.FlowLayoutManager.getNextChildElements(FlowLayoutManager.java:223)
        at org.apache.fop.layoutmgr.FlowLayoutManager.addChildElements(FlowLayoutManager.java:147)
        at org.apache.fop.layoutmgr.FlowLayoutManager.getNextKnuthElements(FlowLayoutManager.java:116)
        at org.apache.fop.layoutmgr.FlowLayoutManager.getNextKnuthElements(FlowLayoutManager.java:69)
        at org.apache.fop.layoutmgr.PageBreaker.getNextKnuthElements(PageBreaker.java:254)
        at org.apache.fop.layoutmgr.AbstractBreaker.getNextBlockList(AbstractBreaker.java:752)
        at org.apache.fop.layoutmgr.PageBreaker.getNextBlockList(PageBreaker.java:180)
        at org.apache.fop.layoutmgr.PageBreaker.getNextBlockList(PageBreaker.java:160)
        at org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:388)
        at org.apache.fop.layoutmgr.PageBreaker.doLayout(PageBreaker.java:114)
        at org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:138)
        at org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:267)
        at org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:130)
        at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:360)
        at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:190)
        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)
        {code}

        Which after a bit of debugging I think stems from a missmatch in which {{breakClasses}}
are supported.
        [BreakUtil|https://github.com/apache/fop/blob/73eea615f89cea80354362fdee08c1186d5a70c4/fop-core/src/main/java/org/apache/fop/util/BreakUtil.java#L34-L40]
and [KnuthPenalty|https://github.com/apache/fop/blob/73eea615f89cea80354362fdee08c1186d5a70c4/fop-core/src/main/java/org/apache/fop/layoutmgr/KnuthPenalty.java#L74-L79]
support the same set of break classes. However [BreakElement|https://github.com/apache/fop/blob/73eea615f89cea80354362fdee08c1186d5a70c4/fop-core/src/main/java/org/apache/fop/layoutmgr/BreakElement.java#L153-L165]
supports a super set, it adds {{EN_LINE}}. This appears to have been part of the fix for:
Bugzilla #53598.

        However at this point I'm really not clear the correct fix is. I suspect changing
{{BreakElement}}  to reject {{EN_LINE}} will just push the exception else where, and I don't
have a clue what adding {{EN_LINE}} to {{BreakUtil}} & {{KnuthPenalty}} will do.

> Keep-with-next integer value: Illegal value for breakClass: 75
> --------------------------------------------------------------
>
>                 Key: FOP-2364
>                 URL: https://issues.apache.org/jira/browse/FOP-2364
>             Project: FOP
>          Issue Type: Bug
>          Components: layout/unqualified
>    Affects Versions: trunk
>            Reporter: Matthias Reischenbacher
>         Attachments: illegal_break_class_75.xml
>
>
> The attached sample FO file causes an IllegalArgumentException: Illegal value for breakClass:
75.
> It seems to be related to the integer value within the keep-with-next property.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message