RMLio / RMLio/dataio

NullPointerException happening on RecordsFactory.getRecords()

Open
#6 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
3
Forks
2
PR merge metrics
No merged PRs in 30d

Description

On RecordsFactory, within the method "getRecords", there is a check to see if the given reference formulation found in the mapping file is actually supported by the mapper. In the case of a non-supported reference formulation found, the code logs an error and leaves the execution run without returning from the method or throwing a controlled error.

// Select the Record Factory based on the reference formulation. if (!referenceFormulationRecordFactoryMap.containsKey(referenceFormulation)) { logger.error("Referenceformulation {} is unsupported!", referenceFormulation); } ReferenceFormulationRecordFactory factory = referenceFormulationRecordFactoryMap.get(referenceFormulation); records = factory.getRecords(access, logicalSource, rmlStore);

Instead what happens is a factory is tried to be retrieved and use this reference, which leads to a NullPointerExcepcion that in turn gets propagated all the way up the Executor class. This happens between lines 138 and 142 of the class RecordsFactory.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in RecordsFactory.getRecords around lines 138–142 and inspect how unsupported reference formulations are handled before the factory lookup. Reproduce the case with a mapping entry that the mapper does not support, then verify that execution no longer propagates a NullPointerException and instead follows the intended controlled error path.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.