Org.osgi.service.prefs unresolvable even though available

Hello bnd community,

I am currently wondering about multiple very weird errors, while using bndtools 6.4.0 with Eclipse 2023-03.

First, when I try to create a new workspace in an empty folder I just created using the bndtools/workspace template I get this error:

The error persists over new Eclipse Installations. However, using the bndtools/workspace.min template works flawlessly (even creating the “conflicting” file

The second error I am facing is the inability to resolve the package org.osgi.service.prefs. I created a minimal example and uploaded it. The workspace only includes the Eclipse 4.24 Repository, a simple empty project, based on the minimal workspace template, and a .bndrun file only requiring said bundle.

All Eclipse Instances were installed using the Eclipse Installer. I am running Windows 11 with various available JDKs (8,11,17) where 17 is selected as target configuration.

The error is

Resolution failed. Capabilities satisfying the following requirements could not be found:
      ⇒ osgi.identity: (osgi.identity=org.osgi.service.prefs)

An example project that is based on PDE works, but translating it to a bnd project results in this error. I am pretty sure the bundle itsself should be available, as it is included in the Eclipse Platform Repository.

I am not sure if this is the correct place to ask such questions, if it is not, I would greatly appreciate a pointer towards the right direction.

Any other input is also greatly appreciated. I am fairly new to bndtools, OSGi, and PDE as I am currently trying to develop a tool for my Bachelors thesis with said tooling.


Edit 1:
There is a more complete setup, where I try to use the Oomph Projects Setup model, which has a dependency on org.osgi.service.prefs and can be found here

Edit 2: Added bndtools version

I updated my minimal example, to not rely on the Eclipse PLatform, but only a local Repo, which contains the JAR. The resolution still fails with above error message.

Does bndtools by default exclude any imports from the org.osgi namespace?

Additionally, when using the filter expression given by the original error message in a bigger project to search it in the repositories view, it finds said bundle.

The filter expression is

I started some debugging with Eclipse and I think I found the culprit, although I don’t seem to understand, where it is coming from.

When starting a ResolutionJob, the model includes a property -runblacklist.enroute. The property value is


So effectively the Bundle Namespace I require, org.osgi.service.prefs is explicitely excluded from resolution.

But where does it come from? Searching the bndtools Github repository for -runblacklist.enroute gives me this file. But it does not include said exclusion…

Next step is to dig deeper and find out where the model comes from, and where it gets the properties from…

After remote Debugging what bndtools actually specifically does during resolution (looks like magic form the outside), I figured where above property came from:

My workspace configuration. The bndtools.workspace.min template includes the file cnf/ext/defaults.bnd where said exclusion is existent.

Like my boss likes to say: the problem often is in front of the monitor.

Consider this to be a PSA in the form of “check whats inside your workspace configuration”.

Edit: Consider this closed :slight_smile:

Sorry I missed it :slight_smile: I guess it was during my vacation this started.

Anyway, alls well ends well