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

Revision history [back]

click to hide/show revision 1
initial version

The way to include a jar on Karaf.

Hi All,

I am able to compile,install and start one of my module in OSGI framework (Hydrogen-Service provider Edition). But when the same module i install and start it on the Karaf it gives me the below error:-

opendaylight-user@root>install file:/home/sdn/l2switch/ODLMDSAL-master/HelloWorldModel/target/HelloWorldModel-0.0.1-SNAPSHOT.jar Bundle ID: 269 opendaylight-user@root>install file:/home/sdn/l2switch/ODLMDSAL-master/HelloWorldImpl/target/HelloWorldImpl-0.0.1-SNAPSHOT.jar Bundle ID: 270 opendaylight-user@root>start 269 opendaylight-user@root>start 270 Error executing command: Error executing command on bundles: Unable to execute command on bundle 270: The bundle "helloworld.HelloWorldImpl0.0.1.SNAPSHOT [270]" could not be resolved. Reason: Missing Constraint: Import-Package: org.codehaus.jettison.json; version="[1.3.0,2.0.0)" opendaylight-user@root>

Jar file (org.codehaus.jettison.jettison-1.3.3.jar) is already present in the plugins folder. I have add dependency in the pom.xml file like :-

<dependency> <groupid>org.codehaus.jettison</groupid> <artifactid>jettison</artifactid> <version>1.3.3</version> </dependency>

Please let me know where i am doing wrong.

Thanks !

The way How to include a jar on Karaf.

Hi All,

I am able to compile,install and start one of my module in OSGI framework (Hydrogen-Service provider Edition). But when the same module i install and start it on the Karaf it gives me the below error:-

opendaylight-user@root>install file:/home/sdn/l2switch/ODLMDSAL-master/HelloWorldModel/target/HelloWorldModel-0.0.1-SNAPSHOT.jar Bundle ID: 269 opendaylight-user@root>install file:/home/sdn/l2switch/ODLMDSAL-master/HelloWorldImpl/target/HelloWorldImpl-0.0.1-SNAPSHOT.jar Bundle ID: 270 opendaylight-user@root>start 269 opendaylight-user@root>start 270 Error executing command: Error executing command on bundles: Unable to execute command on bundle 270: The bundle "helloworld.HelloWorldImpl0.0.1.SNAPSHOT [270]" could not be resolved. Reason: Missing Constraint: Import-Package: org.codehaus.jettison.json; version="[1.3.0,2.0.0)" opendaylight-user@root>

Jar file (org.codehaus.jettison.jettison-1.3.3.jar) is already present in the plugins folder. I have add dependency in the pom.xml file like :-

<dependency> <groupid>org.codehaus.jettison</groupid> <artifactid>jettison</artifactid> <version>1.3.3</version> </dependency>

Please let me know where i am doing wrong.

Thanks !