Guillaume Nodet created FELIX-4478:
--------------------------------------
Summary: Resolution failure
Key: FELIX-4478
URL: https://issues.apache.org/jira/browse/FELIX-4478
Project: Felix
Issue Type: Bug
Components: Resolver
Reporter: Guillaume Nodet
I'm having problems with fragments when using the resolver api. Those bundles
are working fine with the framework resolver though, but I have currently no
idea where the difference is.
The first problem is when I have a fragment which specifies packages which are
imported and exported at the same time.
I end up with the following exception:
{code}
Error executing command: Uses constraint violation. Unable to resolve resource
org.apache.karaf.shell.console [org.apache.karaf.shell.console/4.0.0.SNAPSHOT]
because it exports package 'org.apache.karaf.shell.commands' and is also
exposed to it from resource org.apache.karaf.shell.core
[org.apache.karaf.shell.core/4.0.0.SNAPSHOT] via the following dependency chain:
org.apache.karaf.shell.console [org.apache.karaf.shell.console/4.0.0.SNAPSHOT]
import:
(&(osgi.wiring.package=org.apache.karaf.shell.console.completer)(version>=4.0.0)(!(version>=5.0.0)))
|
export: osgi.wiring.package: org.apache.karaf.shell.console.completer;
uses:=org.apache.karaf.shell.commands
export: osgi.wiring.package=org.apache.karaf.shell.commands
org.apache.karaf.shell.core [org.apache.karaf.shell.core/4.0.0.SNAPSHOT]
{code}
In the above org.apache.karaf.shell.console is fragment,
org.apache.karaf.shell.core is its host and both
org.apache.karaf.shell.commands and org.apache.karaf.shell.console.completer
packages are imported/exported by the fragment.
Trying to work around this issue, I removed the imports on the fragment. But I
have another exception with different bundles:
{code}
Error executing command: Uses constraint violation. Unable to resolve resource
org.apache.karaf.jaas.blueprint.jasypt
[org.apache.karaf.jaas.blueprint.jasypt/4.0.0.SNAPSHOT] because it is exposed
to package 'org.apache.aries.blueprint' from resources
org.apache.aries.blueprint.core [org.apache.aries.blueprint.core/1.4.0] and
org.apache.aries.blueprint.core [org.apache.aries.blueprint.core/1.4.0] via two
dependency chains.
Chain 1:
org.apache.karaf.jaas.blueprint.jasypt
[org.apache.karaf.jaas.blueprint.jasypt/4.0.0.SNAPSHOT]
import:
(&(osgi.wiring.package=org.apache.aries.blueprint)(version>=1.3.0)(!(version>=2.0.0)))
|
export: osgi.wiring.package: org.apache.aries.blueprint
org.apache.aries.blueprint.core [org.apache.aries.blueprint.core/1.4.0]
Chain 2:
org.apache.karaf.jaas.blueprint.jasypt
[org.apache.karaf.jaas.blueprint.jasypt/4.0.0.SNAPSHOT]
import:
(&(osgi.wiring.package=org.apache.aries.blueprint.ext)(version>=1.1.0)(!(version>=2.0.0)))
|
export: osgi.wiring.package: org.apache.aries.blueprint.ext;
uses:=org.apache.aries.blueprint
export: osgi.wiring.package=org.apache.aries.blueprint
org.apache.aries.blueprint.core [org.apache.aries.blueprint.core/1.4.0]
{code}
In the above, the problem is that org.apache.aries.blueprint.core bundle has a
fragment attached, and when debugging, I found out that the two chains are
actually compatible, but one is using the bundle capability while the other is
using the host wrapped capability (which are considered different).
Not really sure where to look at, especially as i have no problems when
actually deploying the bundles.
--
This message was sent by Atlassian JIRA
(v6.2#6252)