Ask is moving to Stack Overflow and Serverfault.com! Please use the "opendaylight" tag on either of these sites. This site is now in Read-Only mode

Revision history [back]

click to hide/show revision 1
initial version

Error notifying listener netapp.impl.NotifProvider java.lang.NullPointerException: Unknown rpc create-subscription

I am using netconf-testtool and sending a notification.xml file to generate notification using the following command; java -jar xxx-exectuable.jar --notification-file notification.xml. I am using Boron-SR2.I followed ncmount(https://github.com/opendaylight/coretutorials/blob/master/ncmount/impl/src/main/java/ncmount/impl/NcmountProvider.java )to write the code for NotifProvider.java.

I see the follwing error in the karaf log:

| ERROR | on-dispatcher-37 | DataChangeListener | 195 - org.opendaylight.controller.sal-distributed-datastore - 1.4.2.Boron-SR2 | Error notifying listener netapp.impl.NotifProvider java.lang.NullPointerException: Unknown rpc (urn:ietf:params:xml:ns:netconf:notification:1.0?revision=2008-07-14)create-subscription, available rpcs: [(urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)cancel-commit, (urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)validate, (urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)commit, (urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring?revision=2010-10-04)get-schema, (urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)kill-session, (urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)edit-config, (urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)get-config, (urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)get, (urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)delete-config, (urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)lock, (urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)close-session, (urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)discard-changes, (urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)copy-config, (urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)unlock] at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:250)[65:com.google.guava:18.0.0] at org.opendaylight.netconf.sal.connect.netconf.schema.mapping.NetconfMessageTransformer.toRpcRequest(NetconfMessageTransformer.java:142)[214:org.opendaylight.netconf.sal-netconf-connector:1.4.2.Boron-SR2] at org.opendaylight.netconf.sal.connect.netconf.schema.mapping.NetconfMessageTransformer.toRpcRequest(NetconfMessageTransformer.java:57)[214:org.opendaylight.netconf.sal-netconf-connector:1.4.2.Boron-SR2] at org.opendaylight.netconf.sal.connect.netconf.sal.NetconfDeviceRpc.invokeRpc(NetconfDeviceRpc.java:61)[214:org.opendaylight.netconf.sal-netconf-connector:1.4.2.Boron-SR2] at org.opendaylight.netconf.sal.connect.netconf.sal.KeepaliveSalFacade$KeepaliveDOMRpcService.invokeRpc(KeepaliveSalFacade.java:281)[214:org.opendaylight.netconf.sal-netconf-connector:1.4.2.Boron-SR2] at org.opendaylight.controller.md.sal.binding.impl.RpcServiceAdapter.invoke0(RpcServiceAdapter.java:65)[165:org.opendaylight.controller.sal-binding-broker-impl:1.4.2.Boron-SR2] at org.opendaylight.controller.md.sal.binding.impl.RpcServiceAdapter.access$000(RpcServiceAdapter.java:43)[165:org.opendaylight.controller.sal-binding-broker-impl:1.4.2.Boron-SR2] at org.opendaylight.controller.md.sal.binding.impl.RpcServiceAdapter$RpcInvocationStrategy.invoke(RpcServiceAdapter.java:159)[165:org.opendaylight.controller.sal-binding-broker-impl:1.4.2.Boron-SR2] at org.opendaylight.controller.md.sal.binding.impl.RpcServiceAdapter.invoke(RpcServiceAdapter.java:96)[165:org.opendaylight.controller.sal-binding-broker-impl:1.4.2.Boron-SR2] at com.sun.proxy.$Proxy116.createSubscription(Unknown Source)[202:org.opendaylight.netconf.ietf-netconf-notifications:1.1.2.Boron-SR2] at netapp.impl.NotifProvider.registerNotificationListener(NotifProvider.java:437)[299:org.opendaylight.coretutorials.netapp-impl:1.1.0.SNAPSHOT] at netapp.impl.NotifProvider.onDataChanged(NotifProvider.java:380)[299:org.opendaylight.coretutorials.netapp-impl:1.1.0.SNAPSHOT] at org.opendaylight.controller.md.sal.binding.impl.AbstractForwardedDataBroker$TranslatingDataChangeInvoker.onDataChanged(AbstractForwardedDataBroker.java:143)[165:org.opendaylight.controller.sal-binding-broker-impl:1.4.2.Boron-SR2] at org.opendaylight.controller.cluster.datastore.DataChangeListener.dataChanged(DataChangeListener.java:71)[195:org.opendaylight.controller.sal-distributed-datastore:1.4.2.Boron-SR2] at org.opendaylight.controller.cluster.datastore.DataChangeListener.handleReceive(DataChangeListener.java:43)[195:org.opendaylight.controller.sal-distributed-datastore:1.4.2.Boron-SR2] at org.opendaylight.controller.cluster.common.actor.AbstractUntypedActor.onReceive(AbstractUntypedActor.java:26)[189:org.opendaylight.controller.sal-clustering-commons:1.4.2.Boron-SR2] at akka.actor.UntypedActor$$anonfun$receive$1.applyOrElse(UntypedActor.scala:165)[177:com.typesafe.akka.actor:2.4.7] at akka.actor.Actor$class.aroundReceive(Actor.scala:484)[177:com.typesafe.akka.actor:2.4.7] at akka.actor.UntypedActor.aroundReceive(UntypedActor.scala:95)[177:com.typesafe.akka.actor:2.4.7] at akka.actor.ActorCell.receiveMessage(ActorCell.scala:526)[177:com.typesafe.akka.actor:2.4.7] at akka.actor.ActorCell.invoke(ActorCell.scala:495)[177:com.typesafe.akka.actor:2.4.7] at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:257)[177:com.typesafe.akka.actor:2.4.7] at akka.dispatch.Mailbox.run(Mailbox.scala:224)[177:com.typesafe.akka.actor:2.4.7] at akka.dispatch.Mailbox.exec(Mailbox.scala:234)[177:com.typesafe.akka.actor:2.4.7] at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)[173:org.scala-lang.scala-library:2.11.8.v20160304-115712-1706a37eb8] at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)[173:org.scala-lang.scala-library:2.11.8.v20160304-115712-1706a37eb8] at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)[173:org.scala-lang.scala-library:2.11.8.v20160304-115712-1706a37eb8] at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)[173:org.scala-lang.scala-library:2.11.8.v20160304-115712-1706a37eb8] 2017-08-30 15:14:22,017 | INFO | sing-executor-12 | NetconfDevice | 214 - org.opendaylight.netconf.sal-netconf-connector - 1.4.2.Boron-SR2 | RemoteDevice{device1}: Netconf connector initialized successfully 2017-08-30 15:14:24,082 | WARN | a]-nio2-thread-5 | AsyncSshHandler | 208 - org.opendaylight.netconf.netty-util - 1.1.2.Boron-SR2 | Unable to setup SSH connection on channel: [id: 0x4b989978] java.net.ConnectException: Connection refused at sun.nio.ch.UnixAsynchronousSocketChannelImpl.checkConnect(Native Method)[:1.8.0144] at sun.nio.ch.UnixAsynchronousSocketChannelImpl.finishConnect(UnixAsynchronousSocketChannelImpl.java:252)[:1.8.0144] at sun.nio.ch.UnixAsynchronousSocketChannelImpl.finish(UnixAsynchronousSocketChannelImpl.java:198)[:1.8.0144] at sun.nio.ch.UnixAsynchronousSocketChannelImpl.onEvent(UnixAsynchronousSocketChannelImpl.java:213)[:1.8.0144] at sun.nio.ch.EPollPort$EventHandlerTask.run(EPollPort.java:293)[:1.8.0144] at java.lang.Thread.run(Thread.java:748)[:1.8.0144]

The lines in which the error is thrown is :

final Future<rpcresult<void>> subscription= rpcService.createSubscription(createSubscriptionInputBuilder.build());

the import statements used for creatingSubscription is:

import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netconf.notification.1.0.rev080714.CreateSubscriptionInputBuilder; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netconf.notification.1.0.rev080714.NotificationsService; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netconf.notification.1.0.rev080714.StreamNameType;

Is there a way to solve this ? if so please help me out.

Error notifying listener netapp.impl.NotifProvider java.lang.NullPointerException: Unknown rpc create-subscription

I am using netconf-testtool and sending a notification.xml file to generate notification using the following command; java -jar xxx-exectuable.jar --notification-file notification.xml. I am using Boron-SR2.I followed ncmount(https://github.com/opendaylight/coretutorials/blob/master/ncmount/impl/src/main/java/ncmount/impl/NcmountProvider.java )to write the code for NotifProvider.java.

The lines in which the error is thrown is : final Future<rpcresult<void>> subscription= rpcService.createSubscription(createSubscriptionInputBuilder.build()); the import statements used for creatingSubscription is: import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netconf.notification.1.0.rev080714.CreateSubscriptionInputBuilder; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netconf.notification.1.0.rev080714.NotificationsService; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netconf.notification.1.0.rev080714.StreamNameType;

I see the follwing error and warning in the karaf log:

| ERROR ERROR | on-dispatcher-37 | DataChangeListener | 195 - org.opendaylight.controller.sal-distributed-datastore - 1.4.2.Boron-SR2 | Error notifying listener netapp.impl.NotifProvider java.lang.NullPointerException: Unknown rpc (urn:ietf:params:xml:ns:netconf:notification:1.0?revision=2008-07-14)create-subscription, available rpcs: [(urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)cancel-commit, (urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)validate, (urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)commit, (urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring?revision=2010-10-04)get-schema, (urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)kill-session, (urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)edit-config, (urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)get-config, (urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)get, (urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)delete-config, (urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)lock, (urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)close-session, (urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)discard-changes, (urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)copy-config, (urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)unlock] at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:250)[65:com.google.guava:18.0.0] at org.opendaylight.netconf.sal.connect.netconf.schema.mapping.NetconfMessageTransformer.toRpcRequest(NetconfMessageTransformer.java:142)[214:org.opendaylight.netconf.sal-netconf-connector:1.4.2.Boron-SR2] at org.opendaylight.netconf.sal.connect.netconf.schema.mapping.NetconfMessageTransformer.toRpcRequest(NetconfMessageTransformer.java:57)[214:org.opendaylight.netconf.sal-netconf-connector:1.4.2.Boron-SR2] at org.opendaylight.netconf.sal.connect.netconf.sal.NetconfDeviceRpc.invokeRpc(NetconfDeviceRpc.java:61)[214:org.opendaylight.netconf.sal-netconf-connector:1.4.2.Boron-SR2] at org.opendaylight.netconf.sal.connect.netconf.sal.KeepaliveSalFacade$KeepaliveDOMRpcService.invokeRpc(KeepaliveSalFacade.java:281)[214:org.opendaylight.netconf.sal-netconf-connector:1.4.2.Boron-SR2] at org.opendaylight.controller.md.sal.binding.impl.RpcServiceAdapter.invoke0(RpcServiceAdapter.java:65)[165:org.opendaylight.controller.sal-binding-broker-impl:1.4.2.Boron-SR2] at org.opendaylight.controller.md.sal.binding.impl.RpcServiceAdapter.access$000(RpcServiceAdapter.java:43)[165:org.opendaylight.controller.sal-binding-broker-impl:1.4.2.Boron-SR2] at org.opendaylight.controller.md.sal.binding.impl.RpcServiceAdapter$RpcInvocationStrategy.invoke(RpcServiceAdapter.java:159)[165:org.opendaylight.controller.sal-binding-broker-impl:1.4.2.Boron-SR2] at org.opendaylight.controller.md.sal.binding.impl.RpcServiceAdapter.invoke(RpcServiceAdapter.java:96)[165:org.opendaylight.controller.sal-binding-broker-impl:1.4.2.Boron-SR2] at com.sun.proxy.$Proxy116.createSubscription(Unknown Source)[202:org.opendaylight.netconf.ietf-netconf-notifications:1.1.2.Boron-SR2] at netapp.impl.NotifProvider.registerNotificationListener(NotifProvider.java:437)[299:org.opendaylight.coretutorials.netapp-impl:1.1.0.SNAPSHOT] at netapp.impl.NotifProvider.onDataChanged(NotifProvider.java:380)[299:org.opendaylight.coretutorials.netapp-impl:1.1.0.SNAPSHOT] at org.opendaylight.controller.md.sal.binding.impl.AbstractForwardedDataBroker$TranslatingDataChangeInvoker.onDataChanged(AbstractForwardedDataBroker.java:143)[165:org.opendaylight.controller.sal-binding-broker-impl:1.4.2.Boron-SR2] at org.opendaylight.controller.cluster.datastore.DataChangeListener.dataChanged(DataChangeListener.java:71)[195:org.opendaylight.controller.sal-distributed-datastore:1.4.2.Boron-SR2] at org.opendaylight.controller.cluster.datastore.DataChangeListener.handleReceive(DataChangeListener.java:43)[195:org.opendaylight.controller.sal-distributed-datastore:1.4.2.Boron-SR2] at org.opendaylight.controller.cluster.common.actor.AbstractUntypedActor.onReceive(AbstractUntypedActor.java:26)[189:org.opendaylight.controller.sal-clustering-commons:1.4.2.Boron-SR2] at akka.actor.UntypedActor$$anonfun$receive$1.applyOrElse(UntypedActor.scala:165)[177:com.typesafe.akka.actor:2.4.7] at akka.actor.Actor$class.aroundReceive(Actor.scala:484)[177:com.typesafe.akka.actor:2.4.7] at akka.actor.UntypedActor.aroundReceive(UntypedActor.scala:95)[177:com.typesafe.akka.actor:2.4.7] at akka.actor.ActorCell.receiveMessage(ActorCell.scala:526)[177:com.typesafe.akka.actor:2.4.7] at akka.actor.ActorCell.invoke(ActorCell.scala:495)[177:com.typesafe.akka.actor:2.4.7] at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:257)[177:com.typesafe.akka.actor:2.4.7] at akka.dispatch.Mailbox.run(Mailbox.scala:224)[177:com.typesafe.akka.actor:2.4.7] at akka.dispatch.Mailbox.exec(Mailbox.scala:234)[177:com.typesafe.akka.actor:2.4.7] at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)[173:org.scala-lang.scala-library:2.11.8.v20160304-115712-1706a37eb8] at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)[173:org.scala-lang.scala-library:2.11.8.v20160304-115712-1706a37eb8] at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)[173:org.scala-lang.scala-library:2.11.8.v20160304-115712-1706a37eb8] at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)[173:org.scala-lang.scala-library:2.11.8.v20160304-115712-1706a37eb8] 2017-08-30 15:14:22,017 | INFO | sing-executor-12 | NetconfDevice | 214 - org.opendaylight.netconf.sal-netconf-connector - 1.4.2.Boron-SR2 | RemoteDevice{device1}: Netconf connector initialized successfully (urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)get,...]

(and)

2017-08-30 15:14:24,082 | WARN WARN | a]-nio2-thread-5 | AsyncSshHandler | 208 - org.opendaylight.netconf.netty-util - 1.1.2.Boron-SR2 | Unable to setup SSH connection on channel: [id: 0x4b989978] java.net.ConnectException: Connection refused at sun.nio.ch.UnixAsynchronousSocketChannelImpl.checkConnect(Native Method)[:1.8.0144] at sun.nio.ch.UnixAsynchronousSocketChannelImpl.finishConnect(UnixAsynchronousSocketChannelImpl.java:252)[:1.8.0144] at sun.nio.ch.UnixAsynchronousSocketChannelImpl.finish(UnixAsynchronousSocketChannelImpl.java:198)[:1.8.0144] at sun.nio.ch.UnixAsynchronousSocketChannelImpl.onEvent(UnixAsynchronousSocketChannelImpl.java:213)[:1.8.0144] at sun.nio.ch.EPollPort$EventHandlerTask.run(EPollPort.java:293)[:1.8.0144] at java.lang.Thread.run(Thread.java:748)[:1.8.0144]

The lines in which the error is thrown is :

final Future<rpcresult<void>> subscription= rpcService.createSubscription(createSubscriptionInputBuilder.build());

the import statements used for creatingSubscription is:

import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netconf.notification.1.0.rev080714.CreateSubscriptionInputBuilder; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netconf.notification.1.0.rev080714.NotificationsService; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netconf.notification.1.0.rev080714.StreamNameType;

Is there a way to solve this ? if so please help me out.