Ask Your Question

install self-developed features/bundles on Karaf

asked 2015-02-05 01:43:57 -0700

yijung0325 gravatar image

updated 2015-02-09 01:41:19 -0700

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.



edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted

answered 2015-02-05 20:08:10 -0700

faizan gravatar image

updated 2015-02-05 21:11:48 -0700

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 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

edit flag offensive delete publish link more


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

faizan ( 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"

yijung0325 ( 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 :))

faizan ( 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 =)

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

@yijung0325 I am also trying to write application by following the ODL wiki 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.

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

answered 2015-02-05 02:05:56 -0700

faizan gravatar image

updated 2015-02-05 02:07:39 -0700

Hi, According to my limited knowledge, In your feature.xml file you need to specify this missing constraint of sal utils. for Ref. follow " " Regards, Faizan

edit flag offensive delete publish link more


Thanks faizan. Please allow me to ask a stupid question again. The first step is "From a directory in your existing project which contains a pom.xml suitable to be a parent pom run." So, is the existing project like "integration" or "controller?" Also, where is the suitable parent POM? Because there already exists a "features" folder in the root directory of the "integration" project, if I run mvn archetype in it, the parent POM and the existing "features" folder will be modified and even overwritten. Could you tell me how to start or even give an example? I really appreciate!

yijung0325 ( 2015-02-05 18:34:15 -0700 )edit

answered 2015-06-10 06:37:19 -0700

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 !

edit flag offensive delete publish link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools



Asked: 2015-02-05 01:43:57 -0700

Seen: 1,793 times

Last updated: Jun 10 '15