# Error: Unable to push configuration due to missing yang models

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)
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 : Please let me know if I am missing something here. I would appreciate your help. edit retag close merge delete ## Comments subhash can you pls share how you solved the problem? thanks. ( 2016-02-23 03:13:31 -0700 )edit ## 4 answers Sort by » oldest newest most voted 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 more ## Comments @hjdeore It will be more helpful if you could explain these points. ( 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 ( 2015-06-17 22:36:01 -0700 )edit 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>

more

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

( 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

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

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

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

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

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

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

more

@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

more