[NETCONF-1204] NPE on topology create-device without credentials Created: 30/Nov/23  Updated: 08/Dec/23  Resolved: 08/Dec/23

Status: Resolved
Project: netconf
Component/s: netconf-topology
Affects Version/s: None
Fix Version/s: 7.0.0, 5.0.10, 6.0.6

Type: Bug Priority: High
Reporter: Ruslan Kashapov Assignee: Ruslan Kashapov
Resolution: Done Votes: 0
Labels: pt
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

STR :

  • start karaf
  • feature:install odl-restconf-nb odl-netconf-topology
  • execute following request:

POST http://localhost:8181/rests/operations/netconf-node-topology:create-device
Body:

<input xmlns="urn:opendaylight:netconf-node-topology">
   <node-id>netconf-test-device</node-id>
   <host>127.0.0.1</host>
   <port>17830</port>
   <tcp-only>false</tcp-only>
   <keepalive-delay>0</keepalive-delay>
 </input>

 
Actual: following exception in log (log:tail in karaf console)

java.lang.NullPointerException: Cannot invoke "Object.toString()" because the return value of "org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev221225.NetconfNode.getCredentials()" is null
        at org.opendaylight.netconf.topology.spi.AbstractNetconfTopology.hideCredentials(AbstractNetconfTopology.java:172) ~[bundleFile:?]
        at org.opendaylight.netconf.topology.spi.AbstractNetconfTopology.lockedEnsureNode(AbstractNetconfTopology.java:114) ~[bundleFile:?]
        at org.opendaylight.netconf.topology.spi.AbstractNetconfTopology.ensureNode(AbstractNetconfTopology.java:91) ~[bundleFile:?]
        at org.opendaylight.netconf.topology.impl.NetconfTopologyImpl.ensureNode(NetconfTopologyImpl.java:143) ~[?:?]
        at org.opendaylight.netconf.topology.impl.NetconfTopologyImpl.onDataTreeChanged(NetconfTopologyImpl.java:129) ~[?:?]
        at org.opendaylight.mdsal.binding.dom.adapter.BindingDOMDataTreeChangeListenerAdapter.onDataTreeChanged(BindingDOMDataTreeChangeListenerAdapter.java:44) ~[bundleFile:?]
        at org.opendaylight.controller.cluster.datastore.DataTreeChangeListenerActor.dataTreeChanged(DataTreeChangeListenerActor.java:90) ~[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:579) [bundleFile:?]
        at akka.actor.ActorCell.invoke(ActorCell.scala:547) [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:373) [?:?]
        at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) [?:?]
        at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) [?:?]
        at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) [?:?]
        at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) [?:?]

Expected:

  • No NPE in log

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