[OpenNMS/opennms] b9ad63: NMS-20258: Keep the DataSource across an event tra...

OpenNMS Machine User via opennms-cvs <[email protected]>
Newsgroups gmane.network.opennms.cvs
Message-ID <OpenNMS/opennms/push/refs/heads/foundation-2025/[email protected]>
  Branch: refs/heads/foundation-2025
  Home:   https://github.com/OpenNMS/opennms
  Commit: b9ad63b5948e9e4df47a3ba40bc2cbb3f2b177fe
      https://github.com/OpenNMS/opennms/commit/b9ad63b5948e9e4df47a3ba40bc2cbb3f2b177fe
  Author: Marshall Massengill <[email protected]>
  Date:   2026-08-26 (Wed, 26 Aug 2026)

  Changed paths:
    M opennms-config/src/main/java/org/opennms/netmgt/config/EventTranslatorConfigFactory.java
    A opennms-config/src/test/java/org/opennms/netmgt/config/EventTranslatorConfigReloadTest.java

  Log Message:
  -----------
  NMS-20258: Keep the DataSource across an event translator config reload (#8814)

EventTranslatorConfigFactory.update() unmarshalled the new configuration
through an overload that passed a null DataSource, so m_dbConnFactory was
cleared on every reload. SqlValueSpec reads that field when it evaluates,
so after the first reloadDaemonConfig for the Translator every mapping
holding a type="sql" value threw

  NullPointerException: Cannot invoke "javax.sql.DataSource.getConnection()"
  because "this.m_db" is null

and stopped translating until OpenNMS was restarted. Mappings without a sql
value kept working, which is why the reload looked successful.

update() was the only caller of the single-argument overload, so it now
passes the DataSource it already holds and the overload is gone.

Reproduced on a live 36.0.4 instance against a translation whose values are
resolved in sql. The shipped translator-configuration.xml resolves ifDescr,
ifName and ifAlias that way, so a reload leaves the default link-down and
link-up translations broken. Present unchanged since 2012 and on every
maintained branch.


  Commit: 167337244656caa2ad3a649ac6b9dbcf5c662240
      https://github.com/OpenNMS/opennms/commit/167337244656caa2ad3a649ac6b9dbcf5c662240
  Author: CI/CD System <[email protected]>
  Date:   2026-08-26 (Wed, 26 Aug 2026)

  Changed paths:
    M opennms-config/src/main/java/org/opennms/netmgt/config/EventTranslatorConfigFactory.java
    A opennms-config/src/test/java/org/opennms/netmgt/config/EventTranslatorConfigReloadTest.java

  Log Message:
  -----------
  Merge remote-tracking branch 'origin/foundation-2024' into foundation-2025


Compare: https://github.com/OpenNMS/opennms/compare/ffdd98b3ed13...167337244656

To unsubscribe from these emails, change your notification settings at https://github.com/OpenNMS/opennms/settings/notifications


_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/wiki/index.php?page=MailingListFaq
opennms-cvs mailing list

To *unsubscribe* or change your subscription options, see the bottom of this page:
https://lists.sourceforge.net/lists/listinfo/opennms-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.