Ask Your Question
0

Error: Unable to push configuration due to missing yang models

asked 2015-06-14 10:59:35 -0700

I want to use the data-broker service in my sample application ( https://github.com/subh007/ODL-Sample-App/tree/ref-md-sal-cup ) to read the Node inforamation, but I am getting the error from config-pusher if I try to use the data-broker.

Error:

Exception in thread "config-pusher" 2015-06-14 23:11:12,306 | ERROR | config-pusher    | ConfigPusherImpl                 | 121 - org.opendaylight.controller.config-persister-impl - 0.4.0.SNAPSHOT | Unable to push configuration due to missing yang models. Yang models that are missing, but required by the configuration: [urn:opendaylight:params:xml:ns:yang:hello:impl?module=hello-impl&revision=2014-12-10]. For each mentioned model check:  1. that the mentioned yang model namespace/name/revision is identical to those in the yang model itself 2. the yang file is present in the system 3. the bundle with that yang file is present in the system and active 4. the yang parser did not fail while attempting to parse that model
java.lang.IllegalStateException: Unable to push configuration due to missing yang models. Required yang models that are missing: [urn:opendaylight:params:xml:ns:yang:hello:impl?module=hello-impl&revision=2014-12-10]
    at org.opendaylight.controller.netconf.persist.impl.ConfigPusherImpl.getOperationServiceWithRetries(ConfigPusherImpl.java:168)
    at org.opendaylight.controller.netconf.persist.impl.ConfigPusherImpl.pushConfigWithConflictingVersionRetries(ConfigPusherImpl.java:131)
    at org.opendaylight.controller.netconf.persist.impl.ConfigPusherImpl.internalPushConfigs(ConfigPusherImpl.java:103)
    at org.opendaylight.controller.netconf.persist.impl.ConfigPusherImpl.process(ConfigPusherImpl.java:76)
    at org.opendaylight.controller.netconf.persist.impl.osgi.ConfigPersisterActivator$InnerCustomizer$1.run(ConfigPersisterActivator.java:181)
    at java.lang.Thread.run(Thread.java:744)
Caused by: org.opendaylight.controller.netconf.persist.impl.ConfigPusherImpl$NotEnoughCapabilitiesException: Not enough capabilities for hello.xml(odl-hello-ui,odl-hello-ui). Expected but not found: [urn:opendaylight:params:xml:ns:yang:hello:impl?module=hello-impl&revision=2014-12-10]
    at org.opendaylight.controller.netconf.persist.impl.ConfigPusherImpl.getOperationService(ConfigPusherImpl.java:248)
    at org.opendaylight.controller.netconf.persist.impl.ConfigPusherImpl.getOperationServiceWithRetries(ConfigPusherImpl.java:151)
    ... 5 more

Following are details :

config.xml : https://github.com/subh007/ODL-Sample-App/blob/ref-md-sal-cup/impl/src/main/config/default-config.xml

impl.yang : https://github.com/subh007/ODL-Sample-App/blob/ref-md-sal-cup/impl/src/main/yang/hello-impl.yang

Please let me know if I am missing something here. I would appreciate your help.

edit retag flag offensive close merge delete

Comments

subhash can you pls share how you solved the problem? thanks.

dancra ( 2016-02-23 03:13:31 -0700 )edit

4 answers

Sort by ยป oldest newest most voted
0

answered 2015-06-15 00:16:13 -0700

hjdeore gravatar image

hey check below points & specially your configuration xml file

For each mentioned model check: 1. that the mentioned yang model namespace/name/revision is identical to those in the yang model itself 2. the yang file is present in the system 3. the bundle with that yang file is present in the system and active 4. the yang parser did not fail while attempting to parse that model

edit flag offensive delete publish link more

Comments

@hjdeore It will be more helpful if you could explain these points.

subhash ( 2015-06-15 03:10:09 -0700 )edit

check for name space you gave in yang model & in configuration xml file. They should be same

hjdeore ( 2015-06-17 22:36:01 -0700 )edit
0

answered 2015-06-17 08:19:51 -0700

vrpolak gravatar image

Comparing with "real" ODL projects, I would guess that https://github.com/subh007/ODL-Sample-App/blob/ref-md-sal-cup/impl/pom.xml does not instruct maven to package your yang model into bundle. I would try to add the following segment in between lines 48-49. (Note that I do not really understand what that segment does.)

<build>
    <plugins>
        <plugin>
            <groupId>org.opendaylight.yangtools</groupId>
            <artifactId>yang-maven-plugin</artifactId>
        </plugin>
        <plugin>
            <groupId>org.apache.felix</groupId>
            <artifactId>maven-bundle-plugin</artifactId>
            <extensions>true</extensions>
            <configuration>
                <instructions>
                    <Bundle-Name>${project.groupId}.${project.artifactId}</Bundle-Name>
                </instructions>
            </configuration>
        </plugin>
    </plugins>
</build>
edit flag offensive delete publish link more

Comments

@vrpolak I resolved the issue by importing the missing import. I am able to get the instance of data-broker. thanks :)

subhash ( 2015-06-17 09:27:30 -0700 )edit

subhash can you pls share the import you missing . Still the problem exists for me..kindly help me in this

kishore345127 ( 2015-07-22 00:57:30 -0700 )edit

yes!could you please share the import u were missing plz!!same problem here!

g_trelos ( 2015-11-23 04:31:01 -0700 )edit

Any solution to this? I am having the same problem with a tutorial project I am building against ODL Lithium SR3. Tried adding yang-maven-plugin to POM file but it dit not help. Yang file is in the JAR under META-INF/yang. Is that correct?

dancra ( 2016-02-23 03:00:44 -0700 )edit

hi @subhash ,could you please tell me how did you resolve the above issue "Unable to push configuration due to missing yang models".

Ayushi ( 2016-05-18 06:23:25 -0700 )edit
0

answered 2016-09-26 01:33:37 -0700

Same issue, please subhash can you pls share the import you were missing

edit flag offensive delete publish link more
0

answered 2016-10-21 07:41:07 -0700

@rriolobos Do you mind re-stating the problem with fresh info, and I'll provide help. All the links are broken in above answers.

Thanks, Alexis

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

Follow
1 follower

Stats

Asked: 2015-06-14 10:59:35 -0700

Seen: 1,160 times

Last updated: Oct 21 '16