Error installing bundles, missing constraint Import-Package: org.opendaylight.controller.sal.core; version="[0.8.0,1.0.0)"

asked 2017-07-21 12:57:14 -0800

EmmittXu gravatar image

updated 2017-07-21 17:30:16 -0800

Hi,

I was trying to install a customized l2switch feature into karaf container. I have three projects:integration, controller, l2switch. Project l2switch is for sending flows to switches and providing API for northbound. In project controller, bundle switchmanager provides restful API for customers and leverages the API of l2switch. Project integration is the program integrated with all the bundles.

I have successfully built the bundle and moved .jar file to the integration folder by doing
cp target/main-impl-0.1.4-Helium-SR4.jar ~/OpenDaylight/integration/distributions/extra/karaf/target/assembly/system/org/opendaylight/l2switch/main/main-impl/0.1.4-Helium-SR4/main-impl-0.1.4-Helium-SR4.jar

Then I started ./karaf I can do
opendaylight-user@root>install file:/home/emmitt/l2switch/l2switch-main/implementation/target/main-impl-0.1.4-Helium-SR4.jar and it works fine with bundle id 196 returned.

But when I did feature:install odl-l2switch-switch, I got this error:

Error executing command: Error executing command on bundles: Unable to execute command on bundle 196: The bundle "org.opendaylight.l2switch.main.impl_0.1.4.Helium-SR4 [196]" could not be resolved. Reason: Missing Constraint: Import-Package: org.opendaylight.controller.sal.core; version="[0.8.0,1.0.0)"

My environment: Apache Maven 3.3.9 Maven home: /usr/share/maven Java version: 1.7.095, vendor: Oracle Corporation Java home: /usr/lib/jvm/java-7-openjdk-amd64/jre Default locale: enUS, platform encoding: UTF-8 OS name: "linux", version: "4.4.0-83-generic", arch: "amd64", family: "unix"

Any advise to help me out? Thanks in advance!

Tony

edit retag flag offensive close merge delete