[YANGTOOLS-900] Problem with duplicate elements with different namespace Created: 04/Sep/18  Updated: 05/Sep/18  Resolved: 05/Sep/18

Status: Resolved
Project: yangtools
Component/s: None
Affects Version/s: 2.0.10, 2.0.6.1
Fix Version/s: 2.1.0, 2.0.11, 2.0.6.3

Type: Bug Priority: High
Reporter: Isabel Lloret Assignee: Isabel Lloret
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

   Good morning,

We are doing some test with Opendaylight Oxigen SR3, yangtools version 2.0.6.1

We are trying to get the network topology with real routers.

We are testing with Cisco ASR9k 9001 

When we try to get the topology with the following request http://<ip>:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/cisco/yang-ext:mount/

we obtain an exception:

 

applicationoperation-failedread execution failedjava.lang.IllegalArgumentException: Failed to parse data response [data: null] at org.opendaylight.netconf.sal.connect.netconf.schema.mapping.NetconfMessageTransformer.toRpcResult(NetconfMessageTransformer.java:197) at org.opendaylight.netconf.sal.connect.netconf.schema.mapping.NetconfMessageTransformer.toRpcResult(NetconfMessageTransformer.java:58) at org.opendaylight.netconf.sal.connect.netconf.sal.NetconfDeviceRpc.lambda$invokeRpc$1(NetconfDeviceRpc.java:65) at com.google.common.util.concurrent.AbstractTransformFuture$TransformFuture.doTransform(AbstractTransformFuture.java:231) at com.google.common.util.concurrent.AbstractTransformFuture$TransformFuture.doTransform(AbstractTransformFuture.java:221) at com.google.common.util.concurrent.AbstractTransformFuture.run(AbstractTransformFuture.java:112) at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:398) at com.google.common.util.concurrent.AbstractFuture.executeListener(AbstractFuture.java:1015) at com.google.common.util.concurrent.AbstractFuture.complete(AbstractFuture.java:868) at com.google.common.util.concurrent.AbstractFuture.set(AbstractFuture.java:691) at org.opendaylight.netconf.sal.connect.netconf.listener.UncancellableFuture.set(UncancellableFuture.java:44) at org.opendaylight.netconf.sal.connect.netconf.listener.NetconfDeviceCommunicator.processMessage(NetconfDeviceCommunicator.java:335) at org.opendaylight.netconf.sal.connect.netconf.listener.NetconfDeviceCommunicator.onMessage(NetconfDeviceCommunicator.java:267) at org.opendaylight.netconf.sal.connect.netconf.listener.NetconfDeviceCommunicator.onMessage(NetconfDeviceCommunicator.java:48) at org.opendaylight.netconf.nettyutil.AbstractNetconfSession.handleMessage(AbstractNetconfSession.java:65) at org.opendaylight.netconf.nettyutil.AbstractNetconfSession.handleMessage(AbstractNetconfSession.java:35) at org.opendaylight.protocol.framework.AbstractProtocolSession.channelRead0(AbstractProtocolSession.java:53) at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) at io.netty.channel.AbstractChannelHandlerContext.access$600(AbstractChannelHandlerContext.java:38) at io.netty.channel.AbstractChannelHandlerContext$7.run(AbstractChannelHandlerContext.java:353) at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163) at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:463) at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:886) at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.IllegalStateException: Duplicate element "aaa" in XML input at: line -1 column -1 at org.opendaylight.yangtools.yang.data.codec.xml.XmlParserStream.read(XmlParserStream.java:350) at org.opendaylight.yangtools.yang.data.codec.xml.XmlParserStream.parse(XmlParserStream.java:184) at org.opendaylight.yangtools.yang.data.codec.xml.XmlParserStream.traverse(XmlParserStream.java:214) at org.opendaylight.netconf.sal.connect.netconf.schema.mapping.NetconfMessageTransformer.toRpcResult(NetconfMessageTransformer.java:194) ... 36 more

 

 

 

 

 



 Comments   
Comment by Robert Varga [ 04/Sep/18 ]

Please provide the XML message (available with NETCONF logging set to trace) and the version of IOS XR software.

Comment by Isabel Lloret [ 04/Sep/18 ]

This is the IOS version: Cisco IOS XR Software, Version 6.2.3[Default]

I copy the duplicated elements from the log:

<data>
<aaa xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-aaa-lib-cfg">
<radius xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-aaa-protocol-radius-cfg">
<dynamic-authorization>
........
</aaa>
<aaa xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-aaa-locald-admin-cfg">
<usernames>
<username>
<name>root</name>
.......

Comment by Robert Varga [ 04/Sep/18 ]

It looks like the namesakes has been incorrectly ported from JSON. In JSON the object name contains the namespace as a prefix, the local name does not. Namesakes should be Set<Entry<String, String>>, with the key being namespace and value being the local name.

Generated at Wed Feb 07 20:54:37 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.