# install self-developed features/bundles on Karaf

Dear experts,

The ping example does not work for Helium Karaf, and the wiki pages about Karaf (Step by Step, How to create a config file, etc.) confuse me because I am almost a dummy for Karaf and OpenDaylight. Could you experts share your experiences to let me know how to install self-developed features/bundles on Karaf? For example, how to make the self-developed feature show while feature:list is entered and then enter feature:install to install it? Could you let me know any references to present an example like the ping wiki page?

My current situation is that, I have developed an AD-SAL bundle which can run on Hydrogen and the base edition of Helium; however, while I put it under the deploy folder, my bundle can not be started.

> bundle:list | grep my_bundle
286 | Installed |  80 | 1.0.0                                     | my_bundle
> bundle:start 286
Error executing command: Error executing command on bundles: Unable to execute command on bundle 286: The bundle "org.opendaylight.controller.myapp_1.0.0 [286]" could not be resolved. Reason: Missing Constraint: Import-Package: org.opendaylight.controller.sal.utils; version="[0.8.0,1.0.0)"


which implies that I need to import org.opendaylight.controller.sal.utils with version = 0.8 - 1.0; however, the MANIFET.MF of my bundle shows that

Import-Package: org.opendaylight.controller.sal.utils;version="[0.8,1)"


which is the same as the error message.

Could you kindly me give me some hints or directions to successfully install my bundle to Helium Karaf? Thanks for your big help. I really appreciate.

Sincerely,

Yi-Jung

edit retag close merge delete

Sort by » oldest newest most voted

Hi Yi-Jung,

I might be wrong, but to clarify you have some module (let YourBundle) and you wanted to load this as feature after you start karaf from odl helium ? If yes, then cd controller/features and Run the opendaylight-karaf-features archetype. this will ask groupId etc provide the info of your modules for example org.abc.yourbundle etc etc. It will create a folder which contains a pom.xml and src folder. In src, you have your feature.xml. Do you changes in them according to use case/dependency of bundle etc and build it.

Regards, Faizan

more

You can also try hot deployment i.e put your jars/bundles in deploy folder and start the karaf. ( i never tried this )

( 2015-02-06 02:11:37 -0700 )edit

Thanks Faizan. Yes, you're right. I try to load my developed bundle as feature and let it start in Helium Karaf. I will follow your suggestion, and probably ask you many questions. Please don't mind. =) I did put my bundle in "deploy" folder (as shown in my question), but it did not work because of "missing constraint"

( 2015-02-06 02:56:12 -0700 )edit

Yes i saw that missing constraint message, that means the bundle you tried to deploy and install depends upon org.opendaylight.controller.sal.utils which also need to put into "deploy" folder and install before you install "yourbundle". Try it, it should also work. And welcome :) Mutual learning :))

( 2015-02-06 05:08:45 -0700 )edit

WOW! Thank you Faizen! The bundle successfully start after I copy dependency bundles into "deploy" too! Really really thank you =)

( 2015-02-08 19:21:02 -0700 )edit

@yijung0325 I am also trying to write application by following the ODL wiki https://wiki.opendaylight.org/view/OpenDaylight_Controller:MD-SAL:Toaster_Step-By-Step but still din't get success. Here I am stuck in deployment of bundle using the xml. Could you suggest some steps to make it working.

( 2015-02-08 22:05:11 -0700 )edit

You should installed dependent features as the error message suggested, I ran into the same error. However, after I installed missing features such as odl-adsal-all (or ald-base-all to make sure) from the feature list in karaf. The error has gone away.

Hope this could help !

more

Hi, According to my limited knowledge, In your feature.xml file you need to specify this missing constraint of sal utils. for Ref. follow " https://wiki.opendaylight.org/view/Karaf:Step_by_Step_Guide " Regards, Faizan

more