Skip to content

RMLMapper crashes when parent Triples Map cannot be found #270

@DylanVanAssche

Description

@DylanVanAssche

What is the problem?

If a parent Triples Map is referenced in a RefObjectMap and this Triples Map is not included in the mapping (or wrong URI), RMLMapper crashes instead of ignoring this join and printing a warning:

14:14:35.663 [main] ERROR be.ugent.rml.cli.Main               .run(478) - Index 0 out of bounds for length 0
java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
        at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
        at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
        at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:266)
        at java.base/java.util.Objects.checkIndex(Objects.java:361)
        at java.base/java.util.ArrayList.get(ArrayList.java:427)
        at be.ugent.rml.MappingOptimizer.eliminateSelfJoins(MappingOptimizer.java:67)
        at be.ugent.rml.MappingOptimizer.optimizeMapping(MappingOptimizer.java:23)
        at be.ugent.rml.Executor.<init>(Executor.java:93)
        at be.ugent.rml.cli.Main.run(Main.java:416)
        at be.ugent.rml.cli.Main.main(Main.java:49)
java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0

How to reproduce?

  1. Try to execute a mapping with a rml:parentTriplesMap which points to a TriplesMap which does not exist.
  2. RMLMapper crashes instead of ignoring the join

Environment

  • RMLMapper v8.0.0
  • Linux
  • Java OpenJDK 17

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions