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

Application Development Tutorial - Error while running hello world

asked 2016-08-05 00:31:02 -0800

rkuppili gravatar image

Hello OpenDaylighters,

I am new to OpenDaylight and start on the application development tutorial. I am using the video tutorial given by Ed Warnicke and Raghurama Bhat. I would like congratulate them on a fantastic job in introducing application development in OpenDaylight. In my case everything went smooth until it was type to test by Hello-World RPC. I am getting the following error message:

"Error sending request - : No implementation of RPC AbsoluteSchemaPath{path=[(urn:opendaylight:params:xml:ns:yang:hello?revision=2015-01-05)hello-world]} available"

Please let me know what I am missing.

  • ramesh
edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted
0

answered 2016-08-07 22:07:48 -0800

karthik330 gravatar image

updated 2016-08-21 23:43:19 -0800

I think you are following the Lithium/beryllium version wiki page to master version(Latest ODL branch-pre boron). In latest version they changed many things.They Follow the blue-print model. Plz refer the attached blue print C:\fakepath\bluePrint.png

Provider class : C:\fakepath\Provider.png

Here I implemented the RPC in Provider class itself. If you want to implement in HelloWorldImpl , then replace the "this" keyword with new HelloWorldImpl() .

Hope It solves the problem. *******Updated******

mvn archetype:generate -DarchetypeGroupId=org.opendaylight.controller -DarchetypeArtifactId=opendaylight-startup-archetype \ -DarchetypeRepository=http://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/ \ -DarchetypeCatalog=http://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/archetype-catalog.xml -DarchetypeVersion=1.1.2-Beryllium-SR2

Its better to use this maven archetype and follow the hello world tutorial. So that you will get actual project structure which is mentioned in the wiki link. This archetype downloads the Beryllium SR2 structure. Note - "\"should come end of your prompt.

Thx

edit flag offensive delete publish link more

Comments

Thanks Karthik. I will try this and update. About duplicate questions, my apologies. My browser crashed while sending in the question. So i sent in the question again without realizing the question was posted already. I deleted the other post.

rkuppili ( 2016-08-08 00:12:34 -0800 )edit

Its ok. let me know if you face any problem

karthik330 ( 2016-08-08 04:40:21 -0800 )edit

I used the maven archtype as suggested by you and it started working. The only issue was build was failing and I had to use ignore test and checkstype options to be able to build successfully. However after that I was able to successfully test the hello world app. Thanks for the help.

rkuppili ( 2016-08-22 04:28:10 -0800 )edit
0

answered 2016-08-19 01:06:10 -0800

rkuppili gravatar image

updated 2016-08-19 01:08:01 -0800

Hello Karthik,

I finally got time to work on this issue. I made changes to my HelloProvider.java based on your suggestion. But I am still getting the same error when I test the changes:

Error sending request - : No implementation of RPC AbsoluteSchemaPath{path=[(urn:opendaylight:params:xml:ns:yang:hello?revision=2015-01-05)hello-world]} available

Thanks a lot for your time. Here is the latest copy of my HelloProvider.java:

/* * Copyright © 2016 Yoyodyne, Inc. and others. All rights reserved.


  • This program and the accompanying materials are made available under the
  • terms of the Eclipse Public License v1.0 which accompanies this distribution,
  • and is available at http://www.eclipse.org/legal/epl-v10.... */ package org.opendaylight.hello.impl;

import java.util.concurrent.Future;

import org.opendaylight.controller.md.sal.binding.api.DataBroker; import org.opendaylight.controller.sal.binding.api.BindingAwareBroker; import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.hello.rev150105.HelloService; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.hello.rev150105.HelloWorldInput; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.hello.rev150105.HelloWorldOutput; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.hello.rev150105.HelloWorldOutputBuilder; import org.opendaylight.yangtools.yang.common.RpcResult; import org.opendaylight.yangtools.yang.common.RpcResultBuilder; import org.slf4j.Logger; import org.slf4j.LoggerFactory;

public class HelloProvider implements HelloService{

private static final Logger LOG = LoggerFactory.getLogger(HelloProvider.class);
private final DataBroker dataBroker;
public RpcProviderRegistry rpcRegistryDependency;

public HelloProvider(final DataBroker dataBroker, RpcProviderRegistry rpcRegistryDependency) {
    this.dataBroker = dataBroker;
    this.rpcRegistryDependency = rpcRegistryDependency;
}

/**
 * Method called when the blueprint container is created.
 */
public void init() {
    LOG.info("HelloProvider Session Initiated");
    final BindingAwareBroker.RpcRegistration<HelloService> rpcRegistration = rpcRegistryDependency.addRpcImplementation(HelloService.class, this);
}

/**
 * Method called when the blueprint container is destroyed.
 */
public void close() {
    LOG.info("HelloProvider Closed");
}

@Override
public Future<RpcResult<HelloWorldOutput>> helloWorld(HelloWorldInput input) {
    HelloWorldOutput output = new HelloWorldOutputBuilder()
        .setGreeting("Hello " + input.getName())
        .build();
    return RpcResultBuilder.success(output).buildFuture();
}

}

  • ramesh
edit flag offensive delete publish link more

Comments

Also refer my blue print ; You have to change your blue print too.

karthik330 ( 2016-08-21 23:37:57 -0800 )edit
Login/Signup to Answer

Stats

Asked: 2016-08-05 00:31:02 -0800

Seen: 735 times

Last updated: Aug 21 '16