Ask is moving to Stack Overflow and! Please use the "opendaylight" tag on either of these sites. This site is now in Read-Only mode


Bundle could not be resolved.Missing Constraint.

asked 2016-05-27 04:50:50 -0700

pande.gaurav gravatar image

We want to use an external jar (org.glassfish.extras) in a maven project.We defined its dependency in pom.xml as :


Also we defined its dependency in features.xml as well.

Running mvn clean install results into a successfull build, however when we install the feature using karaf, it throws the error :

opendaylight-user@root>feature:install odl-cardinal Error executing command: Can't install feature odl-cardinal/0.0.0:
Could not start bundle mvn:org.opendaylight.cardinal/cardinal-impl/0.1.0-SNAPSHOT in feature(s) odl-cardinal-0.1.0-SNAPSHOT: The bundle "org.opendaylight.cardinal.impl_0.1.0.SNAPSHOT [286]" could not be resolved. Reason: Missing Constraint: Import-Package:; version="0.0.0"

Kindly help to solve the issue.

edit retag flag offensive close merge delete


try adding that jar file as <bundle></bundle> in features.xml file . Also, use wrap to add the jar. wrap converts jar to OSGI bundle. <bundle>wrap:mvn:org.kie/kie-api/6.2.0.Final</bundle>

KushalKumar ( 2016-06-02 03:02:13 -0700 )edit

2 answers

Sort by ยป oldest newest most voted

answered 2016-06-06 21:15:28 -0700

pande.gaurav gravatar image

Hi, Finally make it work. after a lot of research I came to know that the error package import:missing was occuring because Osgi was not able to export these packages to the run time environment. This i cross verified by seeing the manifest header of the archetype which imbibe these packages and found out that these packages were private-packages, hence cannot be visible to other bundles. Hope it helps to others as well at sometime.

edit flag offensive delete publish link more


Can you explain how you solved it in details? Thanks!

EmmittXu ( 2017-07-25 13:12:29 -0700 )edit

answered 2016-05-27 05:05:44 -0700

jgoodyear gravatar image

updated 2016-05-27 05:07:16 -0700


Can you supply the Manifest headers for org.opendaylight.cardinal.impl_0.1.0.SNAPSHOT bundle?

On the console, execute bundle:headers 286 (that's the bundle's ID from above), than copy & paste its output here.

Either we'll need to edit the import version range for that bundle to accept what's available in ODL container, OR we'll need to edit the ODL/etc/ file to allow a compatible library from the JVM into the Classpath -- OR we might need to find another bundle that exports the package as a version you can consume.

edit flag offensive delete publish link more
Login/Signup to Answer


Asked: 2016-05-27 04:50:50 -0700

Seen: 129 times

Last updated: Jun 06 '16