Ask is moving to Stack Overflow and Serverfault.com! Please use the "opendaylight" tag on either of these sites. This site is now in Read-Only mode

0

Exception in thread "config-pusher"

asked 2015-09-02 04:01:22 -0800

anhtt gravatar image

I develop application base on ncmount application. https://wiki.opendaylight.org/view/ControllerCoreFunctionalityTutorials:Tutorials:NetconfMount

I want to create a SSH connection to remote host from controller via JSCH library. So I add JSCH dependency to impl/pom.xml

<dependency>
    <groupId>com.jcraft</groupId>
    <artifactId>jsch</artifactId>
    <version>0.1.53</version>
</dependency>

In listNodes() method of NcmountProvider.java, I added follow code.

    try {
        JSch jsch = new JSch();
        Session session = jsch.getSession("username", "hostname", 22);
        session.setPassword("password);
        java.util.Hashtable config = new java.util.Hashtable();
        config.put("StrictHostKeyChecking", "no");
        session.setConfig(config);
        session.setDaemonThread(true);
        session.connect(3 * 1000); // making a connection with timeout.

    } catch (Exception e) {
        e.printStackTrace();
    }

Compile OK, but when I run application, the following error occurred

Exception in thread "config-pusher" java.lang.IllegalStateException: Unable to push configuration due to missing yang models. Required yang models that are missing: [urn:opendaylight:params:xml:ns:yang:ncmount:impl?module=ncmount-impl&revision=2014-12-10] at org.opendaylight.controller.config.persist.impl.ConfigPusherImpl.waitForCapabilities(ConfigPusherImpl.java:186) at org.opendaylight.controller.config.persist.impl.ConfigPusherImpl.pushConfigWithConflictingVersionRetries(ConfigPusherImpl.java:138) at org.opendaylight.controller.config.persist.impl.ConfigPusherImpl.internalPushConfigs(ConfigPusherImpl.java:113) at org.opendaylight.controller.config.persist.impl.ConfigPusherImpl.processSingle(ConfigPusherImpl.java:81) at org.opendaylight.controller.config.persist.impl.ConfigPusherImpl.process(ConfigPusherImpl.java:74) at org.opendaylight.controller.config.persist.impl.osgi.ConfigPersisterActivator$2.run(ConfigPersisterActivator.java:131) at java.lang.Thread.run(Thread.java:744) Caused by: org.opendaylight.controller.config.persist.impl.ConfigPusherImpl$NotEnoughCapabilitiesException: Not enough capabilities for ncmount.xml(odl-ncmount-ui,odl-ncmount-ui). Expected but not found: [urn:opendaylight:params:xml:ns:yang:ncmount:impl?module=ncmount-impl&revision=2014-12-10] at org.opendaylight.controller.config.persist.impl.ConfigPusherImpl.waitForCapabilities(ConfigPusherImpl.java:168) ... 6 more

Please help me to solve this problem.

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2015-09-02 08:24:01 -0800

Colin Dixon gravatar image

What version of OpenDaylight are you using? This is a bug that's known to exist in Helium, but is fixed in Lithium. We've also recently fixed (at least one manifestation of) it in Helium-SR4. That progress is tracked here: https://bugs.opendaylight.org/show_bug.cgi?id=4050

edit flag offensive delete publish link more
0

answered 2015-09-02 19:25:09 -0800

anhtt gravatar image

updated 2015-09-02 19:26:20 -0800

Hi Colin Dixon,

Thanks for your help.But this problem is not bug-id 4050. My problem is using thirty party plugin. Refer to this link https://ask.opendaylight.org/question/1001/how-could-i-fix-could-not-be-resolved-reason-missing-constraint-import-package-comesotericsoftwarekryo

I added following configuration into impl/pom.xml and now it worked.

 <plugin>
     <groupId>org.apache.felix</groupId>
     <artifactId>maven-bundle-plugin</artifactId>
     <version>${bundle.plugin.version}</version>
     <extensions>true</extensions>
     <configuration>
         <instructions>
             <Export-Package>
                 com.jcraft.jsch,
             </Export-Package>
             <Import-Package>*</Import-Package>
             <Embed-Dependency>
                 jsch;type=!pom;inline=false
             </Embed-Dependency>
             <Embed-Transitive>
                 true
             </Embed-Transitive>
         </instructions>
    </configuration>
</plugin>
edit flag offensive delete publish link more
Login/Signup to Answer

Question Tools

Follow
1 follower

Stats

Asked: 2015-09-02 04:01:22 -0800

Seen: 708 times

Last updated: Sep 02 '15