Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Federation initialization order incorrect when loaded from repository manager: NPE in filter evaluation #1990

aschwarte10 opened this issue Mar 11, 2020 · 0 comments


Copy link

@aschwarte10 aschwarte10 commented Mar 11, 2020

On the mailing list it was reported that certain queries run into an NPE, showing up as

Result: org.eclipse.rdf4j.query.QueryEvaluationException: @ sparql_localhost:8891_sparql - n/a. Original exception type: java.lang.NullPointerException.

Analysing this deeply it turns out that this is due to an incorrect initialization order in an environment where the federation is created through a RepositoryManager (e.g. in a RDF4J workbench).

The issue is that the federation manager (and thus access to the strategy) is only initialized after the endpoints are initialized. In this environment the endpoint thus has a null reference to the evaluation strategy.

@aschwarte10 aschwarte10 self-assigned this Mar 11, 2020
@aschwarte10 aschwarte10 added this to the 3.1.2 milestone Mar 11, 2020
aschwarte10 added a commit to aschwarte10/rdf4j that referenced this issue Mar 11, 2020

Due to a wrong initialization order in an environment where the
federation is initialized through a RepositoryManager, references to the
evaluation strategy instance are not available in the Endpoint.

This in turn caused an NPE in the filter evaluation.

This change fixes the issue by first initializing the manager, and only
after that the federation members.
aschwarte10 added a commit that referenced this issue Mar 11, 2020

GH-1990: fix FedX initialization order for RepositoryManager environment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

1 participant
You can’t perform that action at this time.