karaf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Schneider <ch...@die-schneider.net>
Subject Re: Missing Constraint: Import-Package: com.sun.jersey.api.client
Date Tue, 17 Jun 2014 10:51:41 GMT
Try the command package:exports . It lists all exported packages and the 
bundles that export them. You will also see the exported version there.
Compare that with the imports you see from headers <bundleid> of your 
own bundle. If the import range matches the exports then it works.

If the jersey bundles are not already osgi bundles then the wrap command 
will export the package but not add a version. So an import with a range 
will fail.
So defining the import by hand in the maven bundle plugin config without 
a version should help. You can also add parameters for the wrap to 
specify the exported package version but this may be more diffult to 

An even better option may be to try the jersey bundle from servicemix 
bundles :

They should have correct exports.


Am 17.06.2014 09:09, schrieb SapnaB:
> Did that too.. Uninstalled all the jersey jars I had deployed earlier on
> Karaf, and re-deployed using the wrap command. Also re-installed my bundle..
> but the problem still exists.
> I wish Karaf gave more explanatory error messages. I really cant find
> anything to resolve this exception :(
> Unable to start bundle 402: The bundle "Test_0.0.1.SNAPSHOT [402]" could not
> be resolved. Reason: Missing Constraint: Import-Package:
> com.sun.jersey.api.client; version="[1.18.0,2.0.0)"
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Missing-Constraint-Import-Package-com-sun-jersey-api-client-tp4033550p4033565.html
> Sent from the Karaf - Dev mailing list archive at Nabble.com.

Christian Schneider

Open Source Architect
Talend Application Integration Division http://www.talend.com

View raw message