Dear community,

Once again the well-known problem: 
So far I could not find an answer for my problem because I have a completely
different problem than it could be assumed with regard to this error
message. (And i am a newbie...)

I am currently integrating OSGi into an existing application. I *embed* the
framework "Apache Felix 4.3", and i use the maven-bundle-plugin to generate
the manifests. From my own Felix-launcher I run multiple bundles, which
provide various services. In addition, the start-method of the systembundle
registers some services too. The systembundle exports the necessary packages
that contain interfaces of provided services. This works so far.

Now I have a new bundle that requires a package of the systembundle
(respectively a interface of a provided service).



When I start the new bundle I get the error "Unresolved constraint in
bundle...", which indicates that the systembundle does not export the
package (correctly?). But I can see the exports in the Manifest of the
systembundle-jar. I can also see the services of the required package with
the "inspect c service <id>" shell command. The packages are exported and
the services are working.
I tried to solve the problem by adding the property  to my felix, but this
does not solve the problem  because the packages are already and definitely
exported. I also checked the wildcards of import and export clauses. I also
excluded the exported package from the private packages and so on.
So the error is not due to:
-Missing exports and imports
-faulty export or import clauses (wrong wildcards, etc.)
-faulty manifest or POM.

My guess is that the dependencies are not resolved during the Felix-startup.
This either results from the OSGi specification or from the Felix
implementation. I could not find the relevant text passage in the
specifications so far. Maybe someone can give me a reference where I can
find the appropriate information.

The short-term solution to my problem is to switch from  to . I also exclude
the dynamically imported packages in the  clause. Now, my Felix-launcher
starts the new bundle correctly without an error message. However, I want to
avoid dynamic imports. Dynamic imports indicate a non-modular architecture.

Am I right with my assumption that the problem is related to the boot
process of the felix-lauchner? Could someone explain the problem in a
general way and how to avoid this, please. 

(And I don't want to use "Lazy activation".)

Thank you very much!
Roland



--
View this message in context: 
http://apache-felix.18485.x6.nabble.com/Package-constraints-are-not-resolved-during-Framework-startup-Unresolved-constraint-in-bundle-tp5003141.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.

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

Reply via email to