Saxon 9.7.06 EE / XSLT 3 Internal error evaluating template rule
Added by Nic Gibson over 7 years ago
Hi
I'm getting the following Saxon exception running a stylesheet. When I run with tracing enabled it works perfectly.
The error is:
java.lang.RuntimeException: Internal error evaluating template rule at line 38 in module file:/Users/nicg/Projects/CUP/ConsignmentBuilder/xsl/apply-meta-pipeline.xsl at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:369) at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:456) at net.sf.saxon.Controller.transformDocument(Controller.java:2321) at net.sf.saxon.Controller.transform(Controller.java:1892) at net.sf.saxon.s9api.Xslt30Transformer.applyTemplates(Xslt30Transformer.java:565) at net.sf.saxon.Transform.processFile(Transform.java:1253) at net.sf.saxon.Transform.doTransform(Transform.java:795) at net.sf.saxon.Transform.main(Transform.java:77) Caused by: java.lang.RuntimeException: Internal error evaluating function (unnamed) at net.sf.saxon.expr.instruct.UserFunction.call(UserFunction.java:604) at com.saxonica.functions.hof.InlineFunction.call(InlineFunction.java:132) at com.saxonica.functions.hof.CoercedFunction.call(CoercedFunction.java:157) at com.saxonica.functions.hof.CurriedFunction.call(CurriedFunction.java:134) at com.saxonica.functions.hof.FoldLeftFn$FoldLeftFold.processItem(FoldLeftFn.java:44) at net.sf.saxon.functions.FoldingFunction.call(FoldingFunction.java:62) at EE__Slash__01600667055.process(file:/Users/nicg/Projects/CUP/ConsignmentBuilder/xsl/apply-meta-pipeline.xsl:70) at com.saxonica.ee.bytecode.CompiledExpression.process(CompiledExpression.java:70) at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:358) ... 7 more Caused by: java.lang.RuntimeException: Internal error evaluating template rule in module file:/Users/nicg/Projects/CUP/ConsignmentBuilder/xsl/metadata/cup-bits.xsl at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:369) at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:456) at net.sf.saxon.trans.TextOnlyCopyRuleSet.process(TextOnlyCopyRuleSet.java:65) at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:433) at net.sf.saxon.expr.instruct.ApplyTemplates$ApplyTemplatesPackage.processLeavingTail(ApplyTemplates.java:572) at net.sf.saxon.Controller.transformDocument(Controller.java:2323) at net.sf.saxon.Controller.transform(Controller.java:1892) at com.saxonica.functions.extfn.TransformFn$TransformFnCall.call(TransformFn.java:226) at net.sf.saxon.functions.IntegratedFunctionCall.iterate(IntegratedFunctionCall.java:285) at net.sf.saxon.expr.CardinalityChecker.evaluateItem(CardinalityChecker.java:284) at net.sf.saxon.expr.parser.ExpressionTool.evaluate(ExpressionTool.java:316) at net.sf.saxon.expr.instruct.UserFunction.call(UserFunction.java:595) ... 15 more Caused by: java.lang.RuntimeException: Internal error evaluating template rule in module file:/Users/nicg/Projects/CUP/ConsignmentBuilder/xsl/metadata/cup-bits.xsl at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:369) at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:456) at net.sf.saxon.trans.ShallowSkipRuleSet.process(ShallowSkipRuleSet.java:72) at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:433) at net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:301) at net.sf.saxon.expr.instruct.ApplyTemplates.processLeavingTail(ApplyTemplates.java:258) at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:656) at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:149) at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:366) at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:313) at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:149) at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:366) at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:313) at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:656) at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:356) ... 26 more Caused by: java.lang.RuntimeException: Internal error evaluating template rule in module file:/Users/nicg/Projects/CUP/ConsignmentBuilder/xsl/metadata/cup-bits.xsl at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:369) at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:456) at net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:301) at net.sf.saxon.expr.instruct.ApplyTemplates.processLeavingTail(ApplyTemplates.java:258) at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:656) at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:149) at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:366) at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:313) at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:656) at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:149) at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:366) at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:313) at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:732) at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:656) at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:356) ... 40 more Caused by: java.lang.NullPointerException at net.sf.saxon.value.NumericValue.compareTo(NumericValue.java:226) at net.sf.saxon.value.Int64Value.compareTo(Int64Value.java:346) at net.sf.saxon.expr.IntegerRangeTest.evaluateItem(IntegerRangeTest.java:216) at net.sf.saxon.expr.IntegerRangeTest.evaluateItem(IntegerRangeTest.java:31) at net.sf.saxon.expr.Expression.iterate(Expression.java:802) at net.sf.saxon.expr.Expression.effectiveBooleanValue(Expression.java:856) at net.sf.saxon.expr.instruct.Choose.choose(Choose.java:868) at net.sf.saxon.expr.instruct.Choose.processLeavingTail(Choose.java:843) at net.sf.saxon.expr.instruct.Choose.processLeavingTail(Choose.java:846) at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:656) at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:149) at net.sf.saxon.expr.ItemChecker.process(ItemChecker.java:249) at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:358) ... 54 more Fatal error during transformation: java.lang.RuntimeException: Internal error evaluating template rule at line 38 in module file:/Users/nicg/Projects/CUP/ConsignmentBuilder/xsl/apply-meta-pipeline.xsl
The trace is attached. I can email the full XSLT and source document to you directly but can't attach.
The error is occurring in a stylesheet that is executed via saxon:transform which works perfectly when run standalone in the oxygen debugger (I don't see another easy way to test it as it receives element data as parameters). Any suggestions would be grateful received
The calling XSLT is (with a few bits removed):
Applying pipelined metadata transforms to
Unable to load configuration file:
{$metadata-file}
Identified {count($transforms)} stylesheets
This wrapper function is used to compile stylesheets transform documents so that we can output messages and isolate any
changes that might occur with using XSLT 3.0 approaches instead of Saxon specific ones.
Applying {document-uri($stylesheet)} to {document-uri($input)}
apply-pipelines: error executing: {document-uri($stylesheet)} - {$err:description}
thanks
nic gibson
Replies (2)
RE: Saxon 9.7.06 EE / XSLT 3 Internal error evaluating template rule - Added by Michael Kay over 7 years ago
Thanks. If you can mail the stylesheet offline that would be great. It's not usually possible to reconstruct this kind of problem from fragments.
RE: Saxon 9.7.06 EE / XSLT 3 Internal error evaluating template rule - Added by Michael Kay over 7 years ago
Logged as a bug here:
https://saxonica.plan.io/issues/3212
(test material was supplied off-list and the problem has been reproduced)
Please register to reply