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

0

Missing Constraint: Import-Package: org.opendaylight.controller.md.sal.binding.api; version="[1.5.0,2.0.0)

asked 2016-08-19 11:44:51 -0800

arthurguerra gravatar image

updated 2016-08-23 04:06:13 -0800

Hi,

I've been playing with OpenDaylight recently and now I'm trying to create a Hello-World bundle that would be loaded inside the controller.

Before I started working on my own implementation, I took a look at the samples available on the OpenFlowPlugin repository on Github ( https://github.com/opendaylight/openf... ). I successfully managed to compile the learning-switch sample and create the jar file. With this .jar file in hand, I started the controller and run the following command:

install file:/path/to/learning-switch-jar/learning-switch-0.4.0-SNAPSHOT.jar

The installation seemed to work fine and ODL returned a bundle ID: 190. Then, I run:

start 190

and I got the following exception that I can't figure out how to fix.

Error executing command: Error executing command on bundles: Unable to execute command on bundle 190: The bundle "org.opendaylight.openflowplugin.learning-switch_0.4.0.SNAPSHOT [190]" could not be resolved. Reason: Missing Constraint: Import-Package: org.opendaylight.controller.md.sal.binding.api; version="[1.5.0,2.0.0)"

All dependecies I have in the pom.xml are the following:

<dependencies>
    <dependency>
        <groupId>org.opendaylight.openflowplugin.model</groupId>
        <artifactId>model-flow-base</artifactId>
    </dependency>
    <dependency>
        <groupId>org.opendaylight.openflowplugin.model</groupId>
        <artifactId>model-flow-service</artifactId>
    </dependency>
    <dependency>
        <groupId>org.opendaylight.controller.model</groupId>
        <artifactId>model-inventory</artifactId>
    </dependency>
    <dependency>
        <groupId>org.opendaylight.controller</groupId>
        <artifactId>sal-binding-api</artifactId>
    </dependency>
    <dependency>
        <groupId>org.opendaylight.mdsal</groupId>
        <artifactId>yang-binding</artifactId>
    </dependency>
    <dependency>
        <groupId>org.opendaylight.openflowplugin</groupId>
        <artifactId>openflowplugin-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>org.osgi.core</artifactId>
    </dependency>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <scope>test</scope>
    </dependency>
</dependencies>

Any help is really appreciated.

Thanks in advance,

Arthur.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-08-22 05:49:56 -0800

Without your source code it's a bit of a guesswork to figure out what's wrong, but I suspect you may need to add MD-SAL as a dependency to your pom.xml, if you didn't already. Also, the learning switch example may be unmaintained, and using APIs that are no longer available.

edit flag offensive delete publish link more

Comments

I updated my question with the project dependencies. Do you think we are missing any other dependency? Thanks a lot!

arthurguerra ( 2016-08-23 04:07:17 -0800 )edit

Hi, I have the same issue. Did you managed to solve this?

luizana ( 2016-10-29 13:26:43 -0800 )edit
Login/Signup to Answer

Question Tools

Follow
1 follower

Stats

Asked: 2016-08-19 11:44:51 -0800

Seen: 163 times

Last updated: Aug 23 '16