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


How to include a jar on Karaf.

asked 2015-01-21 06:56:01 -0700

viru gravatar image

updated 2015-01-21 11:01:36 -0700

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 !

edit retag flag offensive close merge delete


Hi, could you please post the path of plugin folder in which you have copied jar?? Regards, Ashwini mhatre.

Ashwini_Mhatre ( 2015-01-21 21:08:31 -0700 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2015-01-25 02:47:31 -0700

miclando gravatar image

in karaf,
when you want to include your own jar you need to place it under the deploy folder. here is the karaf folder description:

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

Question Tools

1 follower


Asked: 2015-01-21 06:56:01 -0700

Seen: 933 times

Last updated: Jan 25 '15