Ask Your Question
1

Convert Hydrogen-Module to Helium-Module

asked 2014-12-15 13:14:33 -0700

Lorunification gravatar image

updated 2014-12-17 05:38:02 -0700

Hi Everyone,

I shortly developed a module/bundle/application (whatever it is truly called) to use with the hydrogen release. I used to build my project with maven and move the bundled .jar to my controllers /plugins folder in order to install/start/stop my application via the osgi console.

No i would like to move on to the helium release (Helium SR1 Download from the website).

My problem now is that i don't really know what to do with my application in order to use it within the helium release.

Thank you in advance, again!

UPDATE:

I tried to install my bundle using the command provided in link in the answer.

opendaylight-user@root>bundle:install -s mvn:~/Dokumente/zoom/test_application/
Bundle IDs: 
Error executing command: Error installing bundles:
    Unable to install bundle mvn:~/Dokumente/zoom/test_application/

opendaylight-user@root>bundle:install -s file:~/Dokumente/zoom/test_application/target/test_application-0.5.0-SNAPSHOT.jar
Bundle IDs: 
Error executing command: Error installing bundles:
    Unable to install bundle file:~/Dokumente/zoom/test_application/target/test_application-0.5.0-SNAPSHOT.jar

opendaylight-user@root>bundle:install -s mvn:~/Dokumente/zoom/test_application/target/test_application-0.5.0-SNAPSHOT.jar
Bundle IDs: 
Error executing command: Error installing bundles:
    Unable to install bundle mvn:~/Dokumente/zoom/test_application/target/test_application-0.5.0-SNAPSHOT.jar

Unfortunately i get the errors above. Next i tried to copy the jar into the deploy folder and start it via the bundle:start command.

80 | Installed |  80 | 0.5.0.SNAPSHOT         | test_application                                                   
opendaylight-user@root>bundle:start 80
Error executing command: Error executing command on bundles:
    Unable to execute command on bundle 80: The bundle "org.sdnhub.odl.test_application_0.5.0.SNAPSHOT [80]" could not be resolved. Reason: Missing Constraint: Import-Package: org.apache.felix.dm; version="[3.0.0,4.0.0)"

Which also did not work. DId i do it wrong or is my application just not working with the helium release?

Again i appreciate any help!

UPDATE 2:

I now tried to install the dependencies like advised in the comments. It seems i am just using the bundle:install command wrong.

This is the structure of my ~/.m2/repository containing the .jar of my application:

./org/sdnhub/odl/test_application
./org/sdnhub/odl/test_application/0.5.0-SNAPSHOT/test_application-0.5.0-SNAPSHOT.jar
./org/sdnhub/odl/test_application/0.5.0-SNAPSHOT/test_application-0.5.0-SNAPSHOT.pom

Now how am i supposed to call bundle:install?

Here is what i tried so far.

bundle:install -s mvn:org/sdnhub/odl/test_application/0.5.0-SNAPSHOT/test_application-0.5.0-SNAPSHOT.jar

bundle:install -s mvn:org/sdnhub/odl/test_application/0.5.0-SNAPSHOT/

No matter what i try i always get the same error:

Bundle IDs: 
Error executing command: Error installing bundles:
    Unable to install bundle mvn:org/sdnhub/odl/test_application/0.5.0-SNAPSHOT/test_application-0.5.0-SNAPSHOT.jar

Maybe someone can check if i am using this command totally wrong?

Thank you! Again.

edit retag flag offensive close merge delete

Comments

You should also install your missing dependencies, in this case org.apache.felix.dm. You have to find where is each of the dependencies in your maven repository, which for ubuntu is in home/.m2/repository By the way, are you using karaf or the base distribution?

jhbecares ( 2014-12-16 03:43:17 -0700 )edit

So do have to copy the .jar files from my maven repo manually into the deploy folder? Which file from the repository? In my case there is no org.apache.felix.dm. However, there is a ./org/apache/felix/org.apache.felix.dependencymanager which i guess is just what i need. Now how can i install this?

Lorunification ( 2014-12-16 09:21:30 -0700 )edit

Further: What is the difference between base and karaf? I got the SR1 Release from the homepage and start it via ./bin/karaf - if that is what you mean? And last but not least: Did i invoke the bundle:install correctly? Am i supposed to point it at the built .jar with file: like in hydrogen?

Lorunification ( 2014-12-16 09:22:51 -0700 )edit

I am not sure at all, but I think you should have to add this dependency to your pom before doing mvn clean install. Then add it via bundle:install -s mvn:org.apache... and finally doing the same thing with your plugin.

jhbecares ( 2014-12-16 09:53:00 -0700 )edit

Also, you don't have to point to the local file of your bundle. There should be a similar one inside .m2/repository, so then you should be able to do something like bundle:install -s mvn:org.someRandomPath/morePath/test_application-0.5.0-SNAPSHOT.

jhbecares ( 2014-12-16 09:55:18 -0700 )edit

2 answers

Sort by ยป oldest newest most voted
0

answered 2014-12-16 00:52:35 -0700

jhbecares gravatar image

I think the first thing you should do is try to add your bundle directly into helium release and see if that works. Please refer to this post Plugins in helium-sr1 for that.

If you can't install your bundle, that may be because you have some missing dependencies you have to install before adding your bundle.

Let me know if it works and if not, feel free to write back so we can help you fixing it.

Note: just in case you are not aware of how karaf works, you should launch distribution-karaf-0.2.1-Helium-SR1/bin/karaf (or distribution-karaf-0.2.1-Helium-SR1/karaf/target/assembly/bin/karaf if you're using the distribution inside openflowplugin). That should open karaf console for you, where you can install your bundle and all the dependencies.

Regards

edit flag offensive delete publish link more
0

answered 2016-04-13 09:00:20 -0700

monicarajasekaran gravatar image

Hi,

I am having the same error for installing my custom bundle/application. How did you get it resolved ?

Thanks, Monica

edit flag offensive delete publish link more

Comments

Hi, I havent looked any further into this. But i am currently working on a proper port of my application to beryllium.

Lorunification ( 2016-05-11 03:30:30 -0700 )edit
Login/Signup to Answer

Question Tools

Follow
1 follower

Stats

Asked: 2014-12-15 13:14:33 -0700

Seen: 372 times

Last updated: Apr 13 '16