XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.0.0
    • Labels:
      None

      Description

      I ran into this exception while testing the OpenNMS direct datasource:

      2019-03-21 15:02:24,956 ERROR [AlarmLifecycleListenerManager] o.o.n.a.AlarmLifecycleListenerManager: Error occurred while invoking listener: org.opennms.features.apilayer.alarms.AlarmLifecycleListenerManager$1@7916537b. Skipping.
      java.lang.NullPointerException: null
              at org.opennms.oce.datasource.opennms.jvm.DirectInventoryDatasource.lambda$handleDeletedAlarm$8(DirectInventoryDatasource.java:251) ~[?:?]
              at java.lang.Iterable.forEach(Iterable.java:75) ~[?:1.8.0_191]
              at org.opennms.oce.datasource.opennms.jvm.DirectInventoryDatasource.handleDeletedAlarm(DirectInventoryDatasource.java:249) ~[?:?]
              at org.opennms.oce.datasource.opennms.jvm.DirectInventoryDatasource.lambda$handleAlarmSnapshot$7(DirectInventoryDatasource.java:233) ~[?:?]
              at java.lang.Iterable.forEach(Iterable.java:75) ~[?:1.8.0_191]
              at org.opennms.oce.datasource.opennms.jvm.DirectInventoryDatasource.handleAlarmSnapshot(DirectInventoryDatasource.java:233) ~[?:?]
              at Proxya978741f_9dff_422c_9dff_ded8688c1b08.handleAlarmSnapshot(Unknown Source) ~[?:?]
              at org.opennms.features.apilayer.alarms.AlarmLifecycleListenerManager$1.handleAlarmSnapshot(AlarmLifecycleListenerManager.java:51) ~[?:?]
              at org.opennms.netmgt.alarmd.AlarmLifecycleListenerManager$2.lambda$doInTransactionWithoutResult$0(AlarmLifecycleListenerManager.java:119) ~[opennms-alarmd-24.0.0-SNAPSHOT.jar:?]
              at org.opennms.netmgt.alarmd.AlarmLifecycleListenerManager.forEachListener(AlarmLifecycleListenerManager.java:209) [opennms-alarmd-24.0.0-SNAPSHOT.jar:?]
              at org.opennms.netmgt.alarmd.AlarmLifecycleListenerManager.access$200(AlarmLifecycleListenerManager.java:60) [opennms-alarmd-24.0.0-SNAPSHOT.jar:?]
              at org.opennms.netmgt.alarmd.AlarmLifecycleListenerManager$2.doInTransactionWithoutResult(AlarmLifecycleListenerManager.java:117) [opennms-alarmd-24.0.0-SNAPSHOT.jar:?]
              at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:34) [org.apache.servicemix.bundles.spring-tx-4.2.9.RELEASE_1.jar:?]
              at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133) [org.apache.servicemix.bundles.spring-tx-4.2.9.RELEASE_1.jar:?]
              at org.opennms.netmgt.alarmd.AlarmLifecycleListenerManager.doSnapshot(AlarmLifecycleListenerManager.java:109) [opennms-alarmd-24.0.0-SNAPSHOT.jar:?]
              at org.opennms.netmgt.alarmd.AlarmLifecycleListenerManager$1.run(AlarmLifecycleListenerManager.java:84) [opennms-alarmd-24.0.0-SNAPSHOT.jar:?]
              at java.util.TimerThread.mainLoop(Timer.java:555) [?:1.8.0_191]
              at java.util.TimerThread.run(Timer.java:505) [?:1.8.0_191]
      

      Adding a null check for alarmIdsForInventory on this line would fix this, but it looks like that should never be null in the first place.

        Attachments

          Activity

            People

            • Assignee:
              mbrooks Matthew Brooks
              Reporter:
              j-white Jesse White
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: