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

How to include a jar on Karaf.

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

viru gravatar image

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

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

Comments

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 -0800 )edit

1 answer

Sort by ยป oldest newest most voted
0

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

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:
https://wiki.opendaylight.org/view/KarafDistributionFolderandFile_Guide.

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

Question Tools

Follow
1 follower

Stats

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

Seen: 483 times

Last updated: Jan 25 '15