How to register salFlowService, to prevent DOMRpcImplementationNotAvailableException: No implementation of RPC AbsoluteSchemaPath{path=[(urn:opendaylight:flow:service?revision=2013-08-19)add-flow]} available

asked 2015-10-10 08:28:38 -0700

Denis gravatar image


I get this error msg in karaf, whenever i try to use the salFlowService in my self developed application, Googling pointed out, that I've to register the salFlowService, to prevent this. But i dont know, how to do this properly in my app. Also, the salFlowService works in l2switch, and I cant see any relevant difference from my code to l2switch/main-impl - code. Also i cannot found there any registering of the salFlowService.

some excerpts of my code (only the relevant parts): FlowBuilderModule - create instance:

   public java.lang.AutoCloseable createInstance() {
       SalFlowService salFlowService = rpcRegistryDependency
       final FlowBuilder fb = new FlowBuilder(getDataBrokerDependency(), provider);

Flowbuilders code:

  public class FlowBuilder {
     private SalFlowService salFlowService;

     private void addFlows(List<Flow> flows, NodeConnectorRef destRef) {
        for (Flow f: flows)
           InstanceIdentifier<Flow> flowId = getInstanceIdentifier(flow, destRef);
           AddFlowInput addFlow = new AddFlowInputBuilder(f).setFlowRef(new FlowRef(flowId)).build();
           Future<RpcResult<AddFlowOutput>> futRpc = salFlowService.addFlow(addFlow);
           while (!futRpc.isDone())
              log.debug("flowbuilder: waiting for future rpc");

           if (futRpc.isDone()) {
              try {
                  RpcResult<AddFlowOutput> rpc = futRpc.get();
                  log.debug("flowbuilder: rpc successful : "+rpc.isSuccessful());
            } catch (InterruptedException | ExecutionException e) {
                // TODO Auto-generated catch block

     private InstanceIdentifer<Flow> getInstanceIdentifier(Flow flow, NodeConnectorRef destRef) {
          return InstanceIdentifier
                        new NodeKey(destRef.getValue()
                                .firstKeyOf(Node.class, NodeKey.class)))
                .child(Table.class, new TableKey((short) 0))
                .child(Flow.class, f.getKey()).build();

yang file - implementation part:

 augment "/config:modules/config:module/config:configuration" {
 case flowbuilder-impl {
    when "/config:modules/config:module/config:type = 'flowbuilder-impl'";
     container rpc-registry {
        uses config:service-ref {
          refine type {
            mandatory true;
            config:required-identity mdsal:binding-rpc-registry;

yang file - config part (48-flowbuilder.xml):

       <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
         <modules xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
               <type xmlns:prefix="urn:opendaylight:medqos:flowbuilder-impl">
                  <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">
                  <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-async-data-broker</type>
                     <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-rpc-registry</type>

My application is organized like the l2switch project. Working on Lithium (latest stable/ also tested on built controller from master) In another mailing from your list, i saw that also a possible disconnect of a device can be a factor to raise that exception. But i dont believe this is the point here, as l2switch works. Can anybody point me in the right direction, what I am missing / doing wrong ?

edit retag flag offensive close merge delete


did you find solution to your problem?

g_trelos ( 2015-11-24 06:18:56 -0700 )edit

any luck for this problem?

mahanare ( 2016-02-18 10:24:01 -0700 )edit

I am not able to import the salFlowService in my App. can you tell me which dependency i should add to my pom to get that SalFlowService ?

karthik330 ( 2016-03-21 01:59:28 -0700 )edit

@g_trelos, mahanare: no but i have to admit, that i stopped working with odl, due its complexity and lack of community support

Denis ( 2016-03-21 09:47:40 -0700 )edit

@karthik330: Not sure about it, but i would guess you look for `<groupid>org.opendaylight.openflowplugin.model</groupid> <artifactid>model-flow-service</artifactid>` At least, there are the impls for salFlowService..

Denis ( 2016-03-21 09:48:08 -0700 )edit