Ask Your Question
0

Error on installing feature to odl karaf SR3 distribution.

asked 2015-05-08 07:28:15 -0700

updated 2015-05-19 13:08:32 -0700

I am trying to write sample feature and want to deploy the feature to odl karaf SR3 distribution.

I followed the following wiki for the writing the feature: https://wiki.opendaylight.org/view/OpenDaylightController:MD-SAL:ArchetypeTutorial

but I am getting the error on deploying the feature.

opendaylight-user@root>feature:install task-1.0-SNAPSHOT
Error executing command: No feature named 'task-1.0-SNAPSHOT' with version '0.0.0' available

Following is the feature file:

<?xml version="1.0" encoding="UTF-8"?>

<features name="task-1.0-SNAPSHOT" xmlns="http://karaf.apache.org/xmlns/features/v1.2.0"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.2.0 http://karaf.apache.org/xmlns/features/v1.2.0">

    <feature name='odl-task-provider' version='1.0-SNAPSHOT'>
        <feature version='0.7.0-SNAPSHOT'>odl-yangtools-common</feature>
        <feature version='0.7.0-SNAPSHOT'>odl-yangtools-binding</feature>
        <feature version='1.2.0-SNAPSHOT'>odl-mdsal-broker</feature>
        <bundle>mvn:com.example.yangapp/yang-demo-app-model/1.0-SNAPSHOT</bundle>
        <bundle>mvn:com.example.yangapp/yang-demo-app-provider/1.0-SNAPSHOT</bundle>
        <configfile finalname="etc/opendaylight/karaf/05-task-provider-config.xml">mvn:com.example.yangapp/yang-demo-app-provider/1.0-SNAPSHOT/xml/config</configfile>
    </feature>
    <feature name='odl-task-consumer' version='1.0-SNAPSHOT'>
        <feature>odl-task-provider</feature>
        <bundle>mvn:com.example.yangapp/yang-demo-app-consumer/1.0-SNAPSHOT</bundle>
        <configfile finalname="etc/opendaylight/karaf/06-task-consumer-config.xml">mvn:com.example.yangapp/yang-demo-app-consumer/1.0-SNAPSHOT/xml/config</configfile>
    </feature>
    <feature name='odl-task-web' version='1.0-SNAPSHOT'>
        <feature>http</feature>
        <feature>odl-task-provider</feature>
        <feature version='1.2.0-SNAPSHOT'>odl-restconf-noauth</feature>
        <bundle>mvn:com.example.yangapp/yang-demo-app-web/1.0-SNAPSHOT</bundle>
    </feature>
</features>

I have also tried to install the feature 'odl-task-provider' but again I am getting the error on installtion.

opendaylight-user@root>feature:install odl-task-provider
Error executing command: No feature named 'odl-yangtools-common' with version '0.7.0-SNAPSHOT' available

I have added this feature to ODL by following command:

opendaylight-user@root>feature:repo-add file:/Users/subh/.m2/repository/com/example/yangapp/features-yang-demo-app/1.0-SNAPSHOT/features-yang-demo-app-1.0-SNAPSHOT-features.xml

Please help me to understand the correct way of deploying the feature to ODL karaf distribution. Please correct me if the there is any mistake in adding the feature to ODL karaf distribution.

Update:

I found out that the correct way of deploying of feature is:

  1. add the feature repo to the karaf:

    opendaylight-user>feature:repo-add mvn:<groupid>/features-<artifactid>/<version>/xml/features</version></artifactid></groupid>

  2. install the feature to the karaf:

    opendaylight-user> feature:install <feature-name> </feature-name>

But still deploying my feature I am not able to correctly deploy I am getting the same error. I tried to get the list of dependency:

opendaylight-user@root>feature:info odl-task-provider
Feature odl-task-provider 1.0-SNAPSHOT
Feature has no configuration
Feature configuration files:
  etc/opendaylight/karaf/05-task-provider-config.xml
Feature depends on:
  odl-yangtools-common 0.7.0-SNAPSHOT
  odl-yangtools-binding 0.7.0-SNAPSHOT
  odl-mdsal-broker 1.2.0-SNAPSHOT
Feature contains followed bundles:
  mvn:com.example.yangapp/yang-demo-app-model/1.0-SNAPSHOT
  mvn:com.example.yangapp/yang-demo-app-provider/1.0-SNAPSHOT
Feature has no conditionals.

opendaylight-user@root>feature:info odl-yangtools-common
Feature odl-yangtools-common 0.8.0-SNAPSHOT
Description:
  OpenDaylight :: Yangtools :: Common
Feature has no configuration
Feature has no configuration files
Feature has ...
(more)
edit retag flag offensive close merge delete

Comments

> 'odl-yangtools-common' with version '0.7.0-SNAPSHOT' I believe that is Lithium snapshot version, SR3 version is '0.6.5-Helium-SR3'.

vrpolak ( 2015-05-18 09:52:16 -0700 )edit

thanks @vrpolak for your response. I have update the information. It looks like the yang-tool-common version is not matching. But I am still struggling for deploying my application to the ODL.

subhash ( 2015-05-18 12:56:38 -0700 )edit

> Feature odl-yangtools-common 0.8.0-SNAPSHOT I see that you have switched from Helium SR3 to current master branch (post-Lithium). Now you have to either switch again, to a build from stable/helim branch; or change versions in your feature file to post-Lithium values.

vrpolak ( 2015-05-19 02:50:24 -0700 )edit

@vrpolak you are correct !! there was version mismatch, but after correcting the odl-yangtool-common version in the pom.xml file, I am not able to compile the code.

subhash ( 2015-05-19 13:09:59 -0700 )edit

I do not know which symbol is at TaskProvider.java:[97,59], but if the compilation was successful previously, possibly your code relies on something that was not present in Helium SR3 codebase. Either backport your code, or specify later version of Controller and Yangtools as your dependencies.

vrpolak ( 2015-05-20 05:43:59 -0700 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-02-10 21:10:28 -0700

balaodl gravatar image

hi Subash..

i am also facing the same problem, have you got the solution for this problem.

Thanks, Bala

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

Question Tools

Follow
1 follower

Stats

Asked: 2015-05-08 07:28:15 -0700

Seen: 947 times

Last updated: Feb 10 '16