Uploaded image for project: 'controller'
  1. controller
  2. CONTROLLER-949

RPC register exception when rpc has no input

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Done
    • None
    • None
    • mdsal
    • None
    • Operating System: All
      Platform: All

    • 2233

    Description

      Working with RPCs defined in the yang I got tis exception:

      2014-10-19 16:36:43.877 CEST [config-pusher] ERROR o.o.c.s.b.i.RpcProviderRegistryImpl - Unhandled exception during invoking listener {}
      java.util.NoSuchElementException: null

      << FIND ATTACHED THE FULL STACK TRACE >>

      After some tests I discovered that the exception is thrown when defining a RPC without an input. Output is optional and everything works well if there isn't an output declared.

      Let me show you some examples:
      rpc nothing { } DOESN'T WORK
      rpc only-output { output { leaf foo

      { type string;}

      } } DOESN'T WORK
      rpc empty-input { input { } } WORKS

      Notice that input doesn't have to contain anything. When calling this RPC from java, just use the input builder for building an empty input object. When calling it from RESTconf, just post { input: { } }.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            jhajnar@cisco.com Jan Hajnar
            oscarfernandz@gmail.com Oscar
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: