OP-TED / ted-rdf-mapping

Transformation rules and other artefacts for the TED Semantic Web Services
European Union Public License 1.2
8 stars 0 forks source link

SaxonApiException #434

Closed cristianvasquez closed 5 months ago

cristianvasquez commented 5 months ago

@Dragos0000 suggested to report in the corresponding mapping repository.

We are trying to transform some notices for a given day using https://github.com/OP-TED/ted-rdf-conversion-pipeline .

Some of them are failing with this the following error:

image

net.sf.saxon.s9api.SaxonApiException: A sequence of more than one item is not allowed as the first argument of fn:path() (<cac:ProcurementProjectLot>, <cac:ProcurementProjectLot>) at net.sf.saxon.s9api.XPathSelector.evaluate(XPathSelector.java:233) at net.sf.saxon.s9api.XPathCompiler.evaluate(XPathCompiler.java:610) at be.ugent.rml.records.XMLRecord.get(XMLRecord.java:37) at be.ugent.rml.extractor.ReferenceExtractor.extract(ReferenceExtractor.java:31) at be.ugent.rml.extractor.ReferenceExtractor.execute(ReferenceExtractor.java:41) at be.ugent.rml.functions.StaticMultipleRecordsFunctionExecutor.execute(StaticMultipleRecordsFunctionExecutor.java:30) at be.ugent.rml.Executor.getIRIsWithTrueCondition(Executor.java:309) at be.ugent.rml.Executor.getIRIsWithConditions(Executor.java:273) at be.ugent.rml.Executor.generatePredicateObjectGraphs(Executor.java:227) at be.ugent.rml.Executor.executeWithFunction(Executor.java:165) at be.ugent.rml.Executor.execute(Executor.java:123) at be.ugent.rml.cli.Main.run(Main.java:412) at be.ugent.rml.cli.Main.main(Main.java:46) Caused by: net.sf.saxon.trans.XPathException: A sequence of more than one item is not allowed as the first argument of fn:path() (<cac:ProcurementProjectLot>, <cac:ProcurementProjectLot>) at net.sf.saxon.expr.Expression.typeError(Expression.java:1477) at net.sf.saxon.expr.CardinalityChecker.evaluateItem(CardinalityChecker.java:296) at net.sf.saxon.expr.parser.Evaluator$OptionalItem.evaluate(Evaluator.java:201) at net.sf.saxon.expr.SystemFunctionCall.evaluateArguments(SystemFunctionCall.java:469) at net.sf.saxon.expr.FunctionCall.iterate(FunctionCall.java:560) at net.sf.saxon.sxpath.XPathExpression.iterate(XPathExpression.java:176) at net.sf.saxon.s9api.XPathSelector.evaluate(XPathSelector.java:229) ... 12 more net.sf.saxon.s9api.SaxonApiException: A sequence of more than one item is not allowed as the first argument of fn:path() (<cac:ProcurementProjectLot>, <cac:ProcurementProjectLot>) at net.sf.saxon.s9api.XPathSelector.evaluate(XPathSelector.java:233) at net.sf.saxon.s9api.XPathCompiler.evaluate(XPathCompiler.java:610) at be.ugent.rml.records.XMLRecord.get(XMLRecord.java:37) at be.ugent.rml.extractor.ReferenceExtractor.extract(ReferenceExtractor.java:31) at be.ugent.rml.extractor.ReferenceExtractor.execute(ReferenceExtractor.java:41) at be.ugent.rml.functions.StaticMultipleRecordsFunctionExecutor.execute(StaticMultipleRecordsFunctionExecutor.java:30) at be.ugent.rml.Executor.getIRIsWithTrueCondition(Executor.java:309) at be.ugent.rml.Executor.getIRIsWithConditions(Executor.java:273) at be.ugent.rml.Executor.generatePredicateObjectGraphs(Executor.java:227) at be.ugent.rml.Executor.executeWithFunction(Executor.java:165) at be.ugent.rml.Executor.execute(Executor.java:123) at be.ugent.rml.cli.Main.run(Main.java:412) at be.ugent.rml.cli.Main.main(Main.java:46) Caused by: net.sf.saxon.trans.XPathException: A sequence of more than one item is not allowed as the first argument of fn:path() (<cac:ProcurementProjectLot>, <cac:ProcurementProjectLot>) at net.sf.saxon.expr.Expression.typeError(Expression.java:1477) at net.sf.saxon.expr.CardinalityChecker.evaluateItem(CardinalityChecker.java:296) at net.sf.saxon.expr.parser.Evaluator$OptionalItem.evaluate(Evaluator.java:201) at net.sf.saxon.expr.SystemFunctionCall.evaluateArguments(SystemFunctionCall.java:469) at net.sf.saxon.expr.FunctionCall.iterate(FunctionCall.java:560) at net.sf.saxon.sxpath.XPathExpression.iterate(XPathExpression.java:176) at net.sf.saxon.s9api.XPathSelector.evaluate(XPathSelector.java:229) ... 12 more net.sf.saxon.s9api.SaxonApiException: A sequence of more than one item is not allowed as the first argument of fn:path() (<cac:ProcurementProjectLot>, <cac:ProcurementProjectLot>) at net.sf.saxon.s9api.XPathSelector.evaluate(XPathSelector.java:233) at net.sf.saxon.s9api.XPathCompiler.evaluate(XPathCompiler.java:610) at be.ugent.rml.records.XMLRecord.get(XMLRecord.java:37) at be.ugent.rml.extractor.ReferenceExtractor.extract(ReferenceExtractor.java:31) at be.ugent.rml.extractor.ReferenceExtractor.execute(ReferenceExtractor.java:41) at be.ugent.rml.functions.StaticMultipleRecordsFunctionExecutor.execute(StaticMultipleRecordsFunctionExecutor.java:30) at be.ugent.rml.Executor.getIRIsWithTrueCondition(Executor.java:309) at be.ugent.rml.Executor.getIRIsWithConditions(Executor.java:273) at be.ugent.rml.Executor.generatePredicateObjectGraphs(Executor.java:227) at be.ugent.rml.Executor.executeWithFunction(Executor.java:165) at be.ugent.rml.Executor.execute(Executor.java:123) at be.ugent.rml.cli.Main.run(Main.java:412) at be.ugent.rml.cli.Main.main(Main.java:46) Caused by: net.sf.saxon.trans.XPathException: A sequence of more than one item is not allowed as the first argument of fn:path() (<cac:ProcurementProjectLot>, <cac:ProcurementProjectLot>) at net.sf.saxon.expr.Expression.typeError(Expression.java:1477) at net.sf.saxon.expr.CardinalityChecker.evaluateItem(CardinalityChecker.java:296) at net.sf.saxon.expr.parser.Evaluator$OptionalItem.evaluate(Evaluator.java:201) at net.sf.saxon.expr.SystemFunctionCall.evaluateArguments(SystemFunctionCall.java:469) at net.sf.saxon.expr.FunctionCall.iterate(FunctionCall.java:560) at net.sf.saxon.sxpath.XPathExpression.iterate(XPathExpression.java:176) at net.sf.saxon.s9api.XPathSelector.evaluate(XPathSelector.java:229) ... 12 more net.sf.saxon.s9api.SaxonApiException: A sequence of more than one item is not allowed as the first argument of fn:path() (<cac:ProcurementProjectLot>, <cac:ProcurementProjectLot>) at net.sf.saxon.s9api.XPathSelector.evaluate(XPathSelector.java:233) at net.sf.saxon.s9api.XPathCompiler.evaluate(XPathCompiler.java:610) at be.ugent.rml.records.XMLRecord.get(XMLRecord.java:37) at be.ugent.rml.extractor.ReferenceExtractor.extract(ReferenceExtractor.java:31) at be.ugent.rml.extractor.ReferenceExtractor.execute(ReferenceExtractor.java:41) at be.ugent.rml.functions.StaticMultipleRecordsFunctionExecutor.execute(StaticMultipleRecordsFunctionExecutor.java:30) at be.ugent.rml.Executor.getIRIsWithTrueCondition(Executor.java:309) at be.ugent.rml.Executor.getIRIsWithConditions(Executor.java:273) at be.ugent.rml.Executor.generatePredicateObjectGraphs(Executor.java:227) at be.ugent.rml.Executor.executeWithFunction(Executor.java:165) at be.ugent.rml.Executor.execute(Executor.java:123) at be.ugent.rml.cli.Main.run(Main.java:412) at be.ugent.rml.cli.Main.main(Main.java:46) Caused by: net.sf.saxon.trans.XPathException: A sequence of more than one item is not allowed as the first argument of fn:path() (<cac:ProcurementProjectLot>, <cac:ProcurementProjectLot>) at net.sf.saxon.expr.Expression.typeError(Expression.java:1477) at net.sf.saxon.expr.CardinalityChecker.evaluateItem(CardinalityChecker.java:296) at net.sf.saxon.expr.parser.Evaluator$OptionalItem.evaluate(Evaluator.java:201) at net.sf.saxon.expr.SystemFunctionCall.evaluateArguments(SystemFunctionCall.java:469) at net.sf.saxon.expr.FunctionCall.iterate(FunctionCall.java:560) at net.sf.saxon.sxpath.XPathExpression.iterate(XPathExpression.java:176) at net.sf.saxon.s9api.XPathSelector.evaluate(XPathSelector.java:229) ... 12 more 
schivmeister commented 5 months ago

Thanks for reporting. Unfortunately, we are unable to reproduce this issue on our end, as the transformation works with the following setup:

@cristianvasquez Note that this appears to be an eForms notice and specifically a pipeline issue, so this ticket should be moved to the appropriate project.

@Dragos0000 Please ensure the pipeline environment conforms to the above setup.

Note that RMLMapper v6.2.2 comes bundled with Saxon-HE v11.4:

        <!-- Saxon Home Edition XML, XPath and XQuery parser API -->
        <dependency>
            <groupId>net.sf.saxon</groupId>
            <artifactId>Saxon-HE</artifactId>
            <version>11.4</version>
        </dependency>
costezki commented 5 months ago

Atfer coordinating with colleagues, it appears that this issue is due to misuse of the pipeline. The operators have loaded incomplete mapping suite which were explicitly marked as alpha tags, which are not supposed to be used.

This issue is related to https://github.com/OP-TED/ted-rdf-mapping-eforms/issues/28

cristianvasquez commented 5 months ago

Related issue: https://github.com/OP-TED/ted-rdf-mapping-eforms/issues/27