when I try to deploy a blueprint bundle in a clean equinox test harness (part
of the aries download) and that bundle is using slf4j I'm getting the
following exception :
org.osgi.framework.BundleException: The bundle could not be resolved.
Reason: Package uses conflict: Import-Package: org.osgi.service.blueprint;
version="[1.0.0,2.0.0)"
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolverError(AbstractBundle.java:1313)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolutionFailureException(AbstractBundle.java:1297)
at
org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:309)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:280)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:272)
at
org.eclipse.osgi.framework.internal.core.FrameworkCommandProvider._start(FrameworkCommandProvider.java:253)
This simple bundle has the following Import-Package defined :
Import-Package:
org.osgi.service.blueprint;resolution:=mandatory;version="[1.0.0,2
.0.0)",org.slf4j;resolution:=mandatory;version="[1.6,2)"
I can workaround the problem and start the bundle by either :
a) not using slf4j (and thus removing the org.slf4j package import)
b) set the blueprint import to optional (I can see that the blueprint bean
init method is called on bundle start-up).
Any idea what is causing this ? If my understanding is correct, the "Package
uses conflict" conflict can be caused by another bundle exporting org.slf4j,
and "using" a different blueprint version, however I was unable to find such
a bundle.
I'm getting this error both in Aries 0.3 and in Aries 1.0
When deploying these bundles to Websphere Liberty Profile (using an unknown
version of Aries) I'm not experiencing this error.
Any ideas on how to further debug / fix this ?
--
View this message in context:
http://aries.15396.n3.nabble.com/Deploying-blueprint-bundle-with-org-slf4j-import-results-in-Package-uses-conflict-tp4025698.html
Sent from the Aries - User mailing list archive at Nabble.com.