Description
Generation of NetconfMessage for the <discard-changes> RPC fails if the RPC is customized with an augmentation as in the case of nokia-ietf-netconf-augments@2020-12-23.yang.
NullPointerException is generated while processing <discard-changes> with 'null' input because there is a child augmented in the RPC input.
2022-12-21T18:00:50,918 | ERROR | globalWorkerGroup-3-2 | AbstractFuture | 87 - com.google.guava - 31.1.0.jre | RuntimeException while executing runnable CallbackListener{org.opendaylight.restconf.nb.rfc8040.rests.transactions.NetconfRestconfTransaction$1@dfdcc16} with executor MoreExecutors.directExecutor()
java.lang.NullPointerException: Transforming an rpc with input: (urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)discard-changes, payload cannot be null
at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:994) ~[bundleFile:?]
at org.opendaylight.netconf.sal.connect.netconf.schema.mapping.NetconfMessageTransformer.toRpcRequest(NetconfMessageTransformer.java:351) ~[bundleFile:?]
at org.opendaylight.netconf.sal.connect.netconf.sal.NetconfDeviceRpc.invokeRpc(NetconfDeviceRpc.java:55) ~[bundleFile:?]
at org.opendaylight.netconf.sal.connect.netconf.sal.KeepaliveSalFacade$NormalizedKeepaliveRpcs.invokeRpc(KeepaliveSalFacade.java:354) ~[bundleFile:?]
at org.opendaylight.netconf.sal.connect.api.RemoteDeviceServices$Rpcs$Normalized.invokeNetconf(RemoteDeviceServices.java:43) ~[bundleFile:?]
at org.opendaylight.netconf.sal.connect.netconf.util.NetconfBaseOps.discardChanges(NetconfBaseOps.java:137) ~[bundleFile:?]
at org.opendaylight.netconf.sal.connect.netconf.sal.AbstractNetconfDataTreeService$Candidate.discardChanges(AbstractNetconfDataTreeService.java:54) ~[bundleFile:?]
at org.opendaylight.restconf.nb.rfc8040.rests.transactions.NetconfRestconfTransaction.discardAndUnlock(NetconfRestconfTransaction.java:181) ~[bundleFile:?]
at org.opendaylight.restconf.nb.rfc8040.rests.transactions.NetconfRestconfTransaction$1.onSuccess(NetconfRestconfTransaction.java:132) ~[bundleFile:?]
at org.opendaylight.restconf.nb.rfc8040.rests.transactions.NetconfRestconfTransaction$1.onSuccess(NetconfRestconfTransaction.java:127) ~[bundleFile:?]
at com.google.common.util.concurrent.Futures$CallbackListener.run(Futures.java:1138) ~[bundleFile:?]
at com.google.common.util.concurrent.DirectExecutor.execute(DirectExecutor.java:31) ~[bundleFile:?]
at com.google.common.util.concurrent.AbstractFuture.executeListener(AbstractFuture.java:1270) ~[bundleFile:?]
at com.google.common.util.concurrent.AbstractFuture.complete(AbstractFuture.java:1038) ~[bundleFile:?]
at com.google.common.util.concurrent.AbstractFuture.set(AbstractFuture.java:783) ~[bundleFile:?]
at com.google.common.util.concurrent.CombinedFuture$CallableInterruptibleTask.setValue(CombinedFuture.java:201) ~[bundleFile:?]
at com.google.common.util.concurrent.CombinedFuture$CombinedFutureInterruptibleTask.afterRanInterruptiblySuccess(CombinedFuture.java:129) ~[bundleFile:?]
at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:86) ~[bundleFile:?]
at com.google.common.util.concurrent.DirectExecutor.execute(DirectExecutor.java:31) ~[bundleFile:?]
at com.google.common.util.concurrent.CombinedFuture$CombinedFutureInterruptibleTask.execute(CombinedFuture.java:108) ~[bundleFile:?]
at com.google.common.util.concurrent.CombinedFuture.handleAllCompleted(CombinedFuture.java:65) ~[bundleFile:?]
at com.google.common.util.concurrent.AggregateFuture.processCompleted(AggregateFuture.java:301) ~[bundleFile:?]
at com.google.common.util.concurrent.AggregateFuture.decrementCountAndMaybeComplete(AggregateFuture.java:283) ~[bundleFile:?]
at com.google.common.util.concurrent.AggregateFuture.lambda$init$1(AggregateFuture.java:181) ~[bundleFile:?]
at com.google.common.util.concurrent.DirectExecutor.execute(DirectExecutor.java:31) ~[bundleFile:?]
at com.google.common.util.concurrent.AbstractFuture.executeListener(AbstractFuture.java:1270) ~[bundleFile:?]
at com.google.common.util.concurrent.AbstractFuture.complete(AbstractFuture.java:1038) ~[bundleFile:?]
at com.google.common.util.concurrent.AbstractFuture.set(AbstractFuture.java:783) ~[bundleFile:?]
at com.google.common.util.concurrent.SettableFuture.set(SettableFuture.java:49) ~[bundleFile:?]
at org.opendaylight.netconf.sal.connect.netconf.sal.KeepaliveSalFacade$RequestTimeoutTask.onSuccess(KeepaliveSalFacade.java:324) ~[bundleFile:?]
at com.google.common.util.concurrent.Futures$CallbackListener.run(Futures.java:1138) ~[bundleFile:?]
at com.google.common.util.concurrent.DirectExecutor.execute(DirectExecutor.java:31) ~[bundleFile:?]
at com.google.common.util.concurrent.AbstractFuture.executeListener(AbstractFuture.java:1270) ~[bundleFile:?]
at com.google.common.util.concurrent.AbstractFuture.complete(AbstractFuture.java:1038) ~[bundleFile:?]
at com.google.common.util.concurrent.AbstractFuture.set(AbstractFuture.java:783) ~[bundleFile:?]
at com.google.common.util.concurrent.SettableFuture.set(SettableFuture.java:49) ~[bundleFile:?]
at org.opendaylight.netconf.sal.connect.netconf.sal.NetconfDeviceRpc$1.onSuccess(NetconfDeviceRpc.java:62) ~[bundleFile:?]
at org.opendaylight.netconf.sal.connect.netconf.sal.NetconfDeviceRpc$1.onSuccess(NetconfDeviceRpc.java:58) ~[bundleFile:?]
at com.google.common.util.concurrent.Futures$CallbackListener.run(Futures.java:1138) ~[bundleFile:?]
at com.google.common.util.concurrent.DirectExecutor.execute(DirectExecutor.java:31) ~[bundleFile:?]
at com.google.common.util.concurrent.AbstractFuture.executeListener(AbstractFuture.java:1270) ~[bundleFile:?]
at com.google.common.util.concurrent.AbstractFuture.complete(AbstractFuture.java:1038) ~[bundleFile:?]
at com.google.common.util.concurrent.AbstractFuture.set(AbstractFuture.java:783) ~[bundleFile:?]
at org.opendaylight.netconf.sal.connect.netconf.listener.UncancellableFuture.set(UncancellableFuture.java:45) ~[bundleFile:?]
at org.opendaylight.netconf.sal.connect.netconf.listener.NetconfDeviceCommunicator.processMessage(NetconfDeviceCommunicator.java:334) ~[bundleFile:?]
at org.opendaylight.netconf.sal.connect.netconf.listener.NetconfDeviceCommunicator.onMessage(NetconfDeviceCommunicator.java:270) ~[bundleFile:?]
at org.opendaylight.netconf.sal.connect.netconf.listener.NetconfDeviceCommunicator.onMessage(NetconfDeviceCommunicator.java:51) ~[bundleFile:?]
at org.opendaylight.netconf.nettyutil.AbstractNetconfSession.handleMessage(AbstractNetconfSession.java:65) ~[bundleFile:?]
at org.opendaylight.netconf.nettyutil.AbstractNetconfSession.channelRead0(AbstractNetconfSession.java:186) ~[bundleFile:?]
at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:99) ~[bundleFile:4.1.84.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[bundleFile:4.1.84.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[bundleFile:4.1.84.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[bundleFile:4.1.84.Final]
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:336) ~[bundleFile:4.1.84.Final]
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:308) ~[bundleFile:4.1.84.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[bundleFile:4.1.84.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[bundleFile:4.1.84.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[bundleFile:4.1.84.Final]
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:336) ~[bundleFile:4.1.84.Final]
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:308) ~[bundleFile:4.1.84.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[bundleFile:4.1.84.Final]
at io.netty.channel.AbstractChannelHandlerContext.access$600(AbstractChannelHandlerContext.java:61) ~[bundleFile:4.1.84.Final]
at io.netty.channel.AbstractChannelHandlerContext$7.run(AbstractChannelHandlerContext.java:425) ~[bundleFile:4.1.84.Final]
at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174) ~[bundleFile:4.1.84.Final]
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167) ~[bundleFile:4.1.84.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470) ~[bundleFile:4.1.84.Final]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569) ~[bundleFile:4.1.84.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[bundleFile:4.1.84.Final]
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[bundleFile:4.1.84.Final]
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[bundleFile:4.1.84.Final]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
Attachments
| # | Subject | Branch | Project | Status | CR | V |
|---|---|---|---|---|---|---|
| 103725,2 | Do not use null input for discard-changes | master | netconf | Status: MERGED | +2 | +1 |
| 103841,2 | Do not use null input for discard-changes | 4.0.x | netconf | Status: MERGED | +2 | +1 |
| 103856,1 | Do not use null input for discard-changes | 3.0.x | netconf | Status: MERGED | +2 | +1 |