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

ClassCastException for instance-identifier in leafref

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Done
    • None
    • None
    • restconf
    • None
    • Operating System: Windows
      Platform: PC

    • 652
    • High

    Description

      grouping someGrouping {
      container someContainer {
      leaf someLeaf

      { type instance-identifier; }

      }
      }

      rpc make-foo {
      input {
      leaf qs {
      type leafref

      { path "../../../someGrouping/someContainer/someLeaf"; }

      }
      }
      output {
      leaf result

      { type string; }

      }
      }

      I invoke RPC with this input:
      <input>
      <qs xmlns:np="namespaceOfSomeModule">/np:foo/np:bar[np:name="someValue"]</qs>
      </input>

      ERROR o.o.c.sal.restconf.impl.RestCodec - ClassCastException was thrown when codec is invoked with parameter
      java.lang.ClassCastException: org.opendaylight.controller.sal.restconf.impl.IdentityValuesDTO cannot be cast to java.lang.String
      at org.opendaylight.controller.sal.restconf.impl.RestCodec$LeafrefCodecImpl.deserialize(RestCodec.java:183) ~[bundlefile:na]
      at org.opendaylight.controller.sal.restconf.impl.RestCodec$ObjectCodec.deserialize(RestCodec.java:92) ~[bundlefile:na]
      at org.opendaylight.controller.sal.restconf.impl.RestconfImpl.normalizeNode(RestconfImpl.java:1353) [bundlefile:na]
      at org.opendaylight.controller.sal.restconf.impl.RestconfImpl.normalizeNode(RestconfImpl.java:1289) [bundlefile:na]
      at org.opendaylight.controller.sal.restconf.impl.RestconfImpl.normalizeNode(RestconfImpl.java:1196) [bundlefile:na]
      at org.opendaylight.controller.sal.restconf.impl.RestconfImpl.callRpc(RestconfImpl.java:613) [bundlefile:na]
      at org.opendaylight.controller.sal.restconf.impl.RestconfImpl.invokeRpc(RestconfImpl.java:566) [bundlefile:na]
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_51]

      Attachments

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

        Activity

          People

            jgloncak Jozef Gloncak
            msunal@cisco.com Martin Sunal
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: