[ 
https://issues.apache.org/jira/browse/FOP-3142?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Bowditch closed FOP-3142.
-------------------------------
    Resolution: Not A Bug

As mentioned in the previous comments, this is not a bug in FOP. We merely 
stopped providing Xalan as part of the standard distribution and we now use the 
one bundled with Java, or you can provide your own version if required

> Fatal error when compiling large xsl templates
> ----------------------------------------------
>
>                 Key: FOP-3142
>                 URL: https://issues.apache.org/jira/browse/FOP-3142
>             Project: FOP
>          Issue Type: Bug
>    Affects Versions: 2.8
>            Reporter: Huy Ho
>            Priority: Critical
>
> After we updated from FOP 2.6 to the latest FOP 2.8 version, our application 
> is running into the following error when compiling our stylesheets (stack 
> trace below).  To get around this issue, we downloaded the latest xalan-j 
> 2.7.3 library from [https://xalan.apache.org/xalan-j/index.html] and drop 
> them in the fop/lib directory.  
>  
> {{java.lang.RuntimeException: XPATH_LIMIT}}
> {{        at 
> java.xml/com.sun.org.apache.xalan.internal.xsltc.compiler.Parser.parseTopLevel(Parser.java:1165)}}
> {{        at 
> java.xml/com.sun.org.apache.xalan.internal.xsltc.compiler.Parser.parseExpression(Parser.java:1112)}}
> {{        at 
> java.xml/com.sun.org.apache.xalan.internal.xsltc.compiler.VariableBase.parseContents(VariableBase.java:250)}}
> {{        at 
> java.xml/com.sun.org.apache.xalan.internal.xsltc.compiler.Param.parseContents(Param.java:106)}}
> {{        at 
> java.xml/com.sun.org.apache.xalan.internal.xsltc.compiler.Stylesheet.parseOwnChildren(Stylesheet.java:587)}}
> {{        at 
> java.xml/com.sun.org.apache.xalan.internal.xsltc.compiler.Stylesheet.parseContents(Stylesheet.java:559)}}
> {{        at 
> java.xml/com.sun.org.apache.xalan.internal.xsltc.compiler.Import.parseContents(Import.java:132)}}
> {{        at 
> java.xml/com.sun.org.apache.xalan.internal.xsltc.compiler.Stylesheet.parseOwnChildren(Stylesheet.java:597)}}
> {{        at 
> java.xml/com.sun.org.apache.xalan.internal.xsltc.compiler.Stylesheet.parseContents(Stylesheet.java:559)}}
> {{        at 
> java.xml/com.sun.org.apache.xalan.internal.xsltc.compiler.Parser.createAST(Parser.java:398)}}
> {{        at 
> java.xml/com.sun.org.apache.xalan.internal.xsltc.compiler.XSLTC.compile(XSLTC.java:496)}}
> {{        at 
> java.xml/com.sun.org.apache.xalan.internal.xsltc.compiler.XSLTC.compile(XSLTC.java:576)}}
> {{        at 
> java.xml/com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:1018)}}
> {{        at 
> java.xml/com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:817)}}
> {{        at 
> org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:274)}}
> {{        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:116)}}
> {{        at org.apache.fop.cli.Main.startFOP(Main.java:183)}}
> {{        at org.apache.fop.cli.Main.main(Main.java:214)}}
>  
> {{ERROR:  'JAXP0801003: the compiler encountered XPath expressions with an 
> accumulated '10,001' operators that exceeds the '10,000' limit set by 
> 'FEATURE_SECURE_PROCESSING'.'}}
> {{FATAL ERROR:  'JAXP0801003: the compiler encountered XPath expressions with 
> an accumulated '10,001' operators that exceeds the '10,000' limit set by 
> 'FEATURE_SECURE_PROCESSING'.'}}
> {{[ERROR] FOP - Exception <org.apache.fop.apps.FOPException: 
> javax.xml.transform.TransformerConfigurationException: JAXP0801003: the 
> compiler encountered XPath expressions with an accumulated '10,001' operators 
> that exceeds the '10,000' limit set by 'FEATURE_SECURE_PROCESSING'.}}
> {{javax.xml.transform.TransformerConfigurationException: JAXP0801003: the 
> compiler encountered XPath expressions with an accumulated '10,001' operators 
> that exceeds the '10,000' limit set by 
> 'FEATURE_SECURE_PROCESSING'.>org.apache.fop.apps.FOPException: 
> javax.xml.transform.TransformerConfigurationException: JAXP0801003: the 
> compiler encountered XPath expressions with an accumulated '10,001' operators 
> that exceeds the '10,000' limit set by 'FEATURE_SECURE_PROCESSING'.}}
> {{javax.xml.transform.TransformerConfigurationException: JAXP0801003: the 
> compiler encountered XPath expressions with an accumulated '10,001' operators 
> that exceeds the '10,000' limit set by 'FEATURE_SECURE_PROCESSING'.}}
> {{        at 
> org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:296)}}
> {{        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:116)}}
> {{        at org.apache.fop.cli.Main.startFOP(Main.java:183)}}
> {{        at org.apache.fop.cli.Main.main(Main.java:214)}}
> {{Caused by: javax.xml.transform.TransformerConfigurationException: 
> JAXP0801003: the compiler encountered XPath expressions with an accumulated 
> '10,001' operators that exceeds the '10,000' limit set by 
> 'FEATURE_SECURE_PROCESSING'.}}
> {{        at 
> java.xml/com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:1061)}}
> {{        at 
> java.xml/com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:817)}}
> {{        at 
> org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:274)}}
> {{        ... 3 more}}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to