[jira] [Commented] (FOP-3142) Fatal error when compiling large xsl templates
[ https://issues.apache.org/jira/browse/FOP-3142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17750367#comment-17750367 ] Joshua Marquart commented on FOP-3142: -- As an aside, I see secure-processing is being set, which causes failed XML attribute generation issues since Xalan 2.7.2 (bug XALNJ-2591; https://issues.apache.org/jira/browse/XALANJ-2591 ). This bug was resolved in a servicemix release for Xalan 2.7.2, but the fix was not ported to Xalan 2.7.3. Not certain it affects, but caution should be considered. > 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 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
[jira] [Commented] (FOP-3142) Fatal error when compiling large xsl templates
[ https://issues.apache.org/jira/browse/FOP-3142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17750355#comment-17750355 ] Huy Ho commented on FOP-3142: - Yes, that goes for any dependency library you're using. But considering that xalan has not been updated until very recently, I am not sure I follow that reasoning. The previous time this library was updated was over 9 years ago. Xalan-Java 2.7.3 was released in April 2023. Xalan-Java 2.7.2 was released in April 2014. > 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 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:
[jira] [Commented] (FOP-3142) Fatal error when compiling large xsl templates
[ https://issues.apache.org/jira/browse/FOP-3142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17750352#comment-17750352 ] Simon Steiner commented on FOP-3142: Bundling xalan mean we have to make a new fop release for every xalan security fix > 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 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 >
[jira] [Commented] (FOP-3142) Fatal error when compiling large xsl templates
[ https://issues.apache.org/jira/browse/FOP-3142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17750351#comment-17750351 ] Huy Ho commented on FOP-3142: - Please re-consider your decision to stop providing xalan as part of your standard distribution when the one that comes bundled with JDK has this internal issue. Such a decision forces us to have to update JDK eventually at some point when the fix becomes available in the future just to use FOP. This is not an ideal situation. > 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 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:
[jira] [Commented] (FOP-3142) Fatal error when compiling large xsl templates
[ https://issues.apache.org/jira/browse/FOP-3142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17750343#comment-17750343 ] Huy Ho commented on FOP-3142: - Thanks for the explanation. Here's the java we are running. > java -version Picked up _JAVA_OPTIONS: -Djava.io.tmpdir="/tmp" -XX:-UsePerfData -Xms128M -Xmx2048m -Xss3M openjdk version "11.0.19" 2023-04-18 LTS OpenJDK Runtime Environment (Red_Hat-11.0.19.0.7-2) (build 11.0.19+7-LTS) OpenJDK 64-Bit Server VM (Red_Hat-11.0.19.0.7-2) (build 11.0.19+7-LTS, mixed mode, sharing) We have already tried adding the java definitions mentioned in the stackoverflow link above to bypass the XPATH limit, however, it results in a different error below. We initially thought it was a JDK issue and have updated the JDK to the mentioned version, but that did not fix it either. The only solution we have found to be working thus far is to drop in the xalan.jar library. Picked up _JAVA_OPTIONS: -Djava.io.tmpdir=/usr2/vdxfiles/vtmpgsql/rms/tmp -XX:-UsePerfData -Xms2048m -Xmx2048m -Xss32m -Djdk.xml.xpathExprGrpLimit=0 -Djdk.xml.xpathExprOpLimit=0 -Djdk.xml.xpathTotalOpLimit=0 OpenJDK 64-Bit Server VM warning: Option AggressiveOpts was deprecated in version 11.0 and will likely be removed in a future release. FOP Version 2.8 ERROR: 'Could not compile stylesheet' FATAL ERROR: 'Internal XSLTC error: a method in the translet exceeds the Java Virtual Machine limitation on the length of a method of 64 kilobytes. This is usually caused by templates in a stylesheet that are very large. Try restructuring your stylesheet to use smaller templates.' :Internal XSLTC error: a method in the translet exceeds the Java Virtual Machine limitation on the length of a method of 64 kilobytes. This is usually caused by templates in a stylesheet that are very large. Try restructuring your stylesheet to use smaller templates. [ERROR] FOP - Exception org.apache.fop.apps.FOPException: javax.xml.transform.TransformerConfigurationException: Internal XSLTC error: a method in the translet exceeds the Java Virtual Machine limitation on the length of a method of 64 kilobytes. This is usually caused by templates in a stylesheet that are very large. Try restructuring your stylesheet to use smaller templates. javax.xml.transform.TransformerConfigurationException: Internal XSLTC error: a method in the translet exceeds the Java Virtual Machine limitation on the length of a method of 64 kilobytes. This is usually caused by templates in a stylesheet that are very large. Try restructuring your stylesheet to use smaller templates. > 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 >
[jira] [Commented] (FOP-3142) Fatal error when compiling large xsl templates
[ https://issues.apache.org/jira/browse/FOP-3142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17750125#comment-17750125 ] Jan Tošovský commented on FOP-3142: --- You are reaching the XPath limit. It can be increased, see [https://stackoverflow.com/questions/72401149/limit-set-by-feature-secure-processing] > 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 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 >
[jira] [Commented] (FOP-3142) Fatal error when compiling large xsl templates
[ https://issues.apache.org/jira/browse/FOP-3142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17750117#comment-17750117 ] Simon Steiner commented on FOP-3142: We are using xalan from jdk, what java version are you using? > 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 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 >
[jira] [Commented] (FOP-3142) Fatal error when compiling large xsl templates
[ https://issues.apache.org/jira/browse/FOP-3142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17749995#comment-17749995 ] Huy Ho commented on FOP-3142: - Not sure if this is related or not, but FOP 2.8 lib does not include xalan.jar and xercesImpl.jar that normally comes with xajan-j package. > 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: Major > > 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 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 >