Skip to content

FELIX-6889: Ignore filter indices that can't be created - #609

Open
pderop wants to merge 1 commit into
apache:masterfrom
pderop:FELIX-6889
Open

pderop wants to merge 1 commit into
apache:masterfrom
pderop:FELIX-6889

Conversation

@pderop

@pderop pderop commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

Motivation:

When a filter index configured in the
org.apache.felix.dependencymanager.filterindex property can't be created (for example an unknown class name), a null index was added to the service registry cache, and the following indices were not created. Every service lookup and service event handled by the cache then failed with a NullPointerException, breaking all DM components.

Modification:

Create each configured index separately: an index which can't be created is logged with the DM logger and skipped. An index is only added to the cache once it has been successfully opened. Add a unit test.

Result:

An invalid index is reported as an error, the other indices are still created, and DM components keep working.

Motivation:

When a filter index configured in the
org.apache.felix.dependencymanager.filterindex property can't be created
(for example an unknown class name), a null index was added to the
service registry cache, and the following indices were not created.
Every service lookup and service event handled by the cache then failed
with a NullPointerException, breaking all DM components.

Modification:

Create each configured index separately: an index which can't be
created is logged with the DM logger and skipped. An index is only added
to the cache once it has been successfully opened. Add a unit test.

Result:

An invalid index is reported as an error, the other indices are still
created, and DM components keep working.
@pderop pderop self-assigned this Nov 27, 2026
@pderop pderop changed the title FELIX-6889: DM: ignore filter indices that can't be created FELIX-6889: Ignore filter indices that can't be created Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant