java.lang.NullPointerException

JIRA | Sojan Koshy | 6 months ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    Issue: Notification listener app event() is not getting called when notification is send from test app. 1) schemaRegistry is null - fixed 2) Exception in ytb - not fixed Test steps: 1) Activate yms, ymstest & restconf apps 2) Run testcase testNbiNotification onos> app activate org.onosproject.yms onos> app activate org.onosproject.ymstest onos> app activate org.onosproject.restconf onos> yms-test testNbiNotification Test code snippet: MultiNotificationManger multiNotificationManger = new MultiNotificationManger(); ymsService.registerService(multiNotificationManger, MultiNotification.class, null); print("Registered Service"); MultiNotificationListener multiNotificationListener = new MultiNotificationListener(); YangNotificationService yangNotificationService = ymsService.getYangNotificationService(); yangNotificationService.addListener(multiNotificationListener); print("Added notification listener"); multiNotificationManger.sendNotification(); print("Notification Send"); Test output: --- schemaRegistry is null - fixed ---- https://github.com/GauravAgrawal-Huawei/ymsm/commit/05e3031eb265d2498bda45051aaa093a98a2c21a --- exception not fixed ---- onos> display 2016-09-05 09:53:41,474 | WARN | er-event-handler | YangNotificationManager | 170 - org.onosproject.onos-app-yms - 1.7.0.SNAPSHOT | Failed to process MultiNotificationEvent{time=2016-09-05T09:53:41.474, type=LINK_DOWN, subject=org.onosproject.yang.gen.v1.urn.yms.test.ytb.multi.notification.with.container.rev20160826.multinotification.MultiNotificationEventSubject@5edd7382} java.lang.NullPointerException at org.onosproject.yms.app.ytb.YdtBuilderFromYo.getYangObjectOfNotification(YdtBuilderFromYo.java:807)[170:org.onosproject.onos-app-yms:1.7.0.SNAPSHOT] at org.onosproject.yms.app.ytb.YdtBuilderFromYo.createModuleNodeInYdt(YdtBuilderFromYo.java:222)[170:org.onosproject.onos-app-yms:1.7.0.SNAPSHOT] at org.onosproject.yms.app.ytb.DefaultYangTreeBuilder.getYdtForNotification(DefaultYangTreeBuilder.java:75) at org.onosproject.yms.app.ynh.YangNotificationManager$YnhAbstractListener.lambda$event$0(YangNotificationManager.java:118) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_101] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_101] at java.lang.Thread.run(Thread.java:745)[:1.8.0_101] Confimed and fixed 1st issue by: Gaurav

    JIRA | 6 months ago | Sojan Koshy
    java.lang.NullPointerException

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at org.onosproject.yms.app.ytb.YdtBuilderFromYo.getYangObjectOfNotification()
    2. org.onosproject.yms
      YangNotificationManager$YnhAbstractListener.lambda$event$0
      1. org.onosproject.yms.app.ytb.YdtBuilderFromYo.getYangObjectOfNotification(YdtBuilderFromYo.java:807)[170:org.onosproject.onos-app-yms:1.7.0.SNAPSHOT]
      2. org.onosproject.yms.app.ytb.YdtBuilderFromYo.createModuleNodeInYdt(YdtBuilderFromYo.java:222)[170:org.onosproject.onos-app-yms:1.7.0.SNAPSHOT]
      3. org.onosproject.yms.app.ytb.DefaultYangTreeBuilder.getYdtForNotification(DefaultYangTreeBuilder.java:75)
      4. org.onosproject.yms.app.ynh.YangNotificationManager$YnhAbstractListener.lambda$event$0(YangNotificationManager.java:118)
      4 frames
    3. Java RT
      Thread.run
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_101]
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_101]
      3. java.lang.Thread.run(Thread.java:745)[:1.8.0_101]
      3 frames