[YANGTOOLS-1455] Data change event notification fails Created: 02/Oct/22  Updated: 28/Oct/22  Resolved: 03/Oct/22

Status: Resolved
Project: yangtools
Component/s: data-spi
Affects Version/s: 7.0.0, 8.0.0, 9.0.0, 7.0.17, 8.0.7, 9.0.2
Fix Version/s: 10.0.0, 9.0.2, 8.0.8, 7.0.18

Type: Bug Priority: Medium
Reporter: Jonas Mårtensson Assignee: Robert Varga
Resolution: Done Votes: 0
Labels: regression
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to YANGTOOLS-1022 Rework NormalizedNode class hierarchy... Confirmed

 Description   

I'm creating a notification stream for changes to the topology-netconf using the create-data-change-event-subscription RPC with the following input:

 
{{{}}
    "input": {
{{{}        "path": "/network-topology:network-topology/network-topology:topology[network-topology:topology-id='topology-netconf']"
{}}},
        "sal-remote-augment:datastore": "OPERATIONAL",
        "sal-remote-augment:scope": "BASE",
        "sal-remote-augment:notification-output-type": "JSON"

{\{    }

}}
}
 
and then subscribe to the stream. I'm getting notifications when a new node is created but when the connection-status of a node changes from connected to connecting, I don't get anything. When this happens, the karaf.log shows the following error:
 

2022-10-01T19:35:27,131 | ERROR | opendaylight-cluster-data-notification-dispatcher-46 | DataTreeChangeListenerActor | 220 - org.opendaylight.controller.sal-clustering-commons - 5.0.5 | member-1-shard-topology-operational: Error notifying listener org.opendaylight.netconf.sal.streams.listeners.ListenerAdapter@3a4a6c88
java.lang.ClassCastException: class org.opendaylight.yangtools.yang.data.impl.schema.builder.impl.ImmutableUnkeyedListNodeBuilder$ImmutableUnkeyedListNode cannot be cast to class org.opendaylight.yangtools.yang.data.api.schema.DistinctNodeContainer (org.opendaylight.yangtools.yang.data.impl.schema.builder.impl.ImmutableUnkeyedListNodeBuilder$ImmutableUnkeyedListNode is in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @3557a444; org.opendaylight.yangtools.yang.data.api.schema.DistinctNodeContainer is in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @fa0e355)
at org.opendaylight.yangtools.yang.data.tree.spi.DataTreeCandidateNodes.deleteNode(DataTreeCandidateNodes.java:234) ~[bundleFile:?]
at org.opendaylight.yangtools.yang.data.tree.spi.DataTreeCandidateNodes.containerDelta(DataTreeCandidateNodes.java:114) ~[bundleFile:?]
at org.opendaylight.yangtools.yang.data.tree.spi.RecursiveReplaceCandidateNode.getChildNodes(RecursiveReplaceCandidateNode.java:51) ~[bundleFile:?]
at org.opendaylight.netconf.sal.streams.listeners.ListenerAdapter.addNodeToDataChangeNotificationEventElement(ListenerAdapter.java:254) ~[bundleFile:?]
at org.opendaylight.netconf.sal.streams.listeners.ListenerAdapter.addNodeToDataChangeNotificationEventElement(ListenerAdapter.java:255) ~[bundleFile:?]
at org.opendaylight.netconf.sal.streams.listeners.ListenerAdapter.addNodeToDataChangeNotificationEventElement(ListenerAdapter.java:255) ~[bundleFile:?]
at org.opendaylight.netconf.sal.streams.listeners.ListenerAdapter.addNodeToDataChangeNotificationEventElement(ListenerAdapter.java:255) ~[bundleFile:?]
at org.opendaylight.netconf.sal.streams.listeners.ListenerAdapter.addNodeToDataChangeNotificationEventElement(ListenerAdapter.java:255) ~[bundleFile:?]
at org.opendaylight.netconf.sal.streams.listeners.ListenerAdapter.addValuesToDataChangedNotificationEventElement(ListenerAdapter.java:193) ~[bundleFile:?]
at org.opendaylight.netconf.sal.streams.listeners.ListenerAdapter.prepareXml(ListenerAdapter.java:160) ~[bundleFile:?]
at org.opendaylight.netconf.sal.streams.listeners.ListenerAdapter.onDataTreeChanged(ListenerAdapter.java:97) ~[bundleFile:?]
at org.opendaylight.controller.cluster.datastore.DataTreeChangeListenerActor.dataTreeChanged(DataTreeChangeListenerActor.java:84) ~[bundleFile:?]
at org.opendaylight.controller.cluster.datastore.DataTreeChangeListenerActor.handleReceive(DataTreeChangeListenerActor.java:45) ~[bundleFile:?]
at akka.japi.pf.UnitCaseStatement.apply(CaseStatements.scala:24) [bundleFile:?]
at akka.japi.pf.UnitCaseStatement.apply(CaseStatements.scala:20) [bundleFile:?]
at scala.PartialFunction.applyOrElse(PartialFunction.scala:214) [bundleFile:?]
at scala.PartialFunction.applyOrElse$(PartialFunction.scala:213) [bundleFile:?]
at akka.japi.pf.UnitCaseStatement.applyOrElse(CaseStatements.scala:20) [bundleFile:?]
at scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:269) [bundleFile:?]
at scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:270) [bundleFile:?]
at akka.actor.Actor.aroundReceive(Actor.scala:537) [bundleFile:?]
at akka.actor.Actor.aroundReceive$(Actor.scala:535) [bundleFile:?]
at akka.actor.AbstractActor.aroundReceive(AbstractActor.scala:220) [bundleFile:?]
at akka.actor.ActorCell.receiveMessage(ActorCell.scala:580) [bundleFile:?]
at akka.actor.ActorCell.invoke(ActorCell.scala:548) [bundleFile:?]
at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:270) [bundleFile:?]
at akka.dispatch.Mailbox.run(Mailbox.scala:231) [bundleFile:?]
at akka.dispatch.Mailbox.exec(Mailbox.scala:243) [bundleFile:?]
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290) [?:?]
at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020) [?:?]
at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656) [?:?]
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594) [?:?]
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183) [?:?]

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