OSGi package not running: missing osgi.wiring.package requirement; > & (osgi.wiring.package = org.apache.felix.dm)

I am trying to follow "Build Modular Cloud Applications with OSGi". In the third chapter of the book "Building Your First OSGi Application", the author describes how to create a simple OSGi application with a service in eclipse using bndtools.

Below is a screenshot of my classes and configurations.

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

The problem I am facing is

'! failed to resolve packages: [Agenda.service.simple-0.0.1 Installed limitation in package Agenda.service.simple [9]: Unable to resolve 9.0: missing requirement [9.0] osgi.wiring.package; (& Amp ;! (Osgi.wiring.package = org.apache.felix.dm) (version> = 3.0.0) ((version> = 4.0.0)))

]! Failed to run package Agenda.service.simple-0.0.1, exception Unresolved restriction in package Agenda.service.simple [9]: Unable to execute resolution 9.0: Missing requirement [9.0] osgi.wiring.package; (& Amp ;! (Osgi.wiring.package = org.apache.felix.dm) (version> = 3.0.0) ((version> = 4.0.0))) ____________________________

Also when I try to issue a command in the gogo shell that also sometimes fails to enter correctly. But in the end when this package state looks like

g! lb gogo: CommandNotFoundException: command not found: b

g! lb gogo: CommandNotFoundException: command not found: llb

g!

g!

g!

g!

g!

g!

lb START LEVEL 1 ID | Condition | Level | Name

0|Active     |    0|System Bundle (4.0.3)

1|Active     |    1|Apache Felix Dependency Manager (4.0.1)

2|Active     |    1|Apache Felix Dependency Manager Shell (4.0.1)

3|Active     |    1|Apache Felix Gogo Command (0.14.0)

4|Active     |    1|Apache Felix Gogo Runtime (0.10.0)

5|Active     |    1|Apache Felix Gogo Runtime (0.12.1)

6|Active     |    1|Apache Felix Gogo Shell (0.10.0)

7|Active     |    1|osgi.cmpn (5.0.0.201305092017)

8|Active     |    1|agenda.api (0.0.0.201505171119)

9|Installed  |    1|agenda.service.simple (0.0.1)

      

+3


source to share


3 answers


Your Agenda.service.simple package looks for a package that exports the version of org.apache.felix.dm between 3.0.0 and 4.0.0, but it only finds version 4.0.1, which is Apache Felix Export Dependency Manager.



This can usually be caused by compiling against a different version of felix than you are doing.

+1


source


This can usually be caused by compiling against a different version of felix than you are doing.

However, this could be caused by Bndtools picking the lowest version (in the specified version range) for buildpath dependencies and the highest version (in the specified version range) for runbundles.

In your case, no ranges are specified, so the version of org.apache.felix.dependencymanager version 3.1.0 will be used for the build path and 4.0.1 to run your application.

To use version 4 of the dependency manager, you can change the build path entry:



org.apache.felix.dependencymanager;version='[4,5)'

      

Or, to use version 3 at runtime, you change the -runbundles options to

org.apache.felix.dependencymanager;version='[3,4)',\
org.apache.felix.dependencymanager.shell;version='[3,4)',\

      

0


source


I am also reading the book above. I had the same problem when trying to run the project. This issue occurs because we are manually providing dependency manager .jars

our project, which in turn conflicts with the version .jar

required for the project.

I did a fresh Eclipse setup in advanced mode using Amdatu Blueprint and was able to get the current project. Installation details can be obtained from the following link:

http://amdatu-repo.s3.amazonaws.com/amdatu-blueprint/r1/docs/index.html#_install_eclipse

0


source







All Articles