felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Remy Masson <remy.mas...@ullink.com>
Subject Missing import packages in the bundle manifest - failing iPOJO instantiations at runtime
Date Mon, 13 Jun 2011 10:37:40 GMT

I'm encountering an issue when using both iPOJO and BND.

I'm using BND to figure which packages should be required by the bundle.
BND, when inspecting the class' bytecode, won't consider annotations having
retention policies other than RUNTIME, which is the case of @Provides. This
seems to make sense - if they're not available at run time, there is no
reason to be requiring them.
However if the package of the interface isn't imported by the extension,
iPOJO will fail instancing the POJO since it wasn't required by the

The reason the interface isn't used anywhere else is that the class itself
extends an abstract class which is not provided by the bundle - BND is not
supposed to be importing other than by inspecting the annotation.

Am I doing something wrong?
The way I see it, either:
- the iPOJO task should be adding the required packages in the
Import-package clause
- the Provides annotation could have a runtime retention policy in order for
BND (or other bytecode inspecting tool) to be able to know it has to
consider the classes it specifies
- I could inspect the manifest and look for the iPojo specifications, and
add the corresponding packages if they're not already there

The first option seems to be the most sensible one, but I'm not sure. Did I
miss something?

Thanks for your input,


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message