Hi,

On 21.04.2010 10:23, Charles-Louis De Maere wrote:
> Hi all,
> 
> 
> I'm quite new to felix and osgi, and am migrating an existing felix
> framework developed externally to the newer versions of osgi (4.2.0) and
> felix (2.0.4).
> 
> It uses fileinstall (2.0.8) for dynamically starting the bundles in a
> specified directory.
> 
> After fixing dependency issues that prevented the framework from
> starting, I am now in a situation where the framework seems to start
> correctly, because I have no more "dependency" errors when starting the
> framework. However, some of the bundles stay in the state [Installed]
> whereas others are in status [Active].
> 
> What troubles me is that the main bundle stays in the [Installed] state :
> 
> [  12] [Active     ] [    1] Apache Felix Shell TUI (1.4.1)
> [  13] [Active     ] [    1] Apache Felix Bundle Repository (1.4.3)
> [  14] [Installed  ] [    1] foo-bar (1.0.0.SNAPSHOT)
> 
> When I try to start it manually, I get the following error :
> -> start 14
> org.osgi.framework.BundleException: Unresolved constraint in bundle
> foo-bar [14]: package;
> (&(package=org.osgi.service.component)(version>=1.1.0)(!(version>=2.0.0)))
> 
> However, in the pom.xml for the foo-bar package, I have the following
> configuration :
> 
> <Import-Package>
>                             org.osgi.service.component;version="[1.1,2.0)",
>                             org.osgi.framework;version="[1.5,2.0)",
>                             ...
> </Import-Package>

You need the org.osgi.service.component API in version 1.1 or higher but
not 2.0. You have to install a bundle (or export from the system bundle)
the respective package. One example would be the Apache Felix
Declarative Services (SCR) bundle version 1.4.0.

> 
> I thought that specifying the version information in the
> <Import-Package> section could get rid of these Unresolved Constraint
> errors.

No, it just lets you specify exactly what versions of imports you need.
If there is no provider (exporter) for the packages in the desired
version ranges, the bundle cannot resolve.

Hope this helps.

Regards
Felix

> 
> Is there any other place I should look in order to fix this ?
> 
> 
> Thanks,
> 
> Charles-Louis
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to