Skip to content

"Could not create default artifact repositories!" error when an existing bundle has a null symbolic name#22

Open
RefuX wants to merge 1 commit into
eclipse-osgi-technology:mainfrom
RefuX:nulls
Open

"Could not create default artifact repositories!" error when an existing bundle has a null symbolic name#22
RefuX wants to merge 1 commit into
eclipse-osgi-technology:mainfrom
RefuX:nulls

Conversation

@RefuX

@RefuX RefuX commented May 28, 2025

Copy link
Copy Markdown
Contributor

I have some snapshot bundles installed which don't have a symbolic names, and this was causing FeatureRuntimeImpl to blowup with a FeatureRuntimeException("Could not create default artifact repositories!").

Adding this check fixed it.

@stbischof

Copy link
Copy Markdown
Contributor

Do you als agree?

@sonarqubecloud

sonarqubecloud Bot commented Aug 5, 2025

Copy link
Copy Markdown

@laeubi

laeubi commented Nov 18, 2025

Copy link
Copy Markdown

I have some snapshot bundles installed which don't have a symbolic names,

Symbolic name is a required header and therefore these are not valid bundles see

https://docs.osgi.org/specification/osgi.core/8.0.0/framework.module.html#d0e2086

The Bundle-SymbolicName header specifies a non-localizable name for this bundle. The bundle symbolic name together with a version must identify a unique bundle though it can be installed multiple times in a framework. The bundle symbolic name should be based on the reverse domain name convention, see Bundle-SymbolicName. This header must be set.

So it seems okay to filter these out but one would really wonder how it becomes that way and maybe better throw a more suitable exception.

Beside that the version is allowed to be omitted and then defaults to 0.0.0 see

https://docs.osgi.org/specification/osgi.core/8.0.0/framework.module.html#d0e2103

The Bundle-Version header specifies the version of this bundle. See Version. The default value is 0.0.0

Therefore I think it should not be filtered as invalid but assumed to be the default if missing.

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.

3 participants