Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-32301

Stop NotificationService missconfiguration from clogging test logs

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2023.10
    • Component/s: ColdStorage

      Description

      NotificationService has a GENERAL_SETTINGS_EP which can set a custom mail session jndi name.

      When refactoring, this mechanic has been deprecated in favor of
      MailSender. To avoid breaking changes, it's not replaced by default but should be in tests.

      This is done via the NotificationFeature : https://github.com/nuxeo/nuxeo-lts/blob/2023/modules/platform/nuxeo-platform-notification/src/test/java/org/nuxeo/ecm/platform/ec/notification/NotificationFeature.java#L29

      We need to use it in the cold storage tests to avoid such redundant errors and warns (22 occurrences in https://jenkins.platform.dev.nuxeo.com/job/coldstorage/job/nuxeo-coldstorage/job/lts-2023/24/consoleText)

      2024-01-29 16:38:04,368 [main] WARN  [NotificationService] Your GeneralSettingsDescriptor has been contributed with a custom mailSessionJndiName. This field is now deprecated. Please use mailSenderName and contribute a MailSenderDescriptor
      2024-01-29 16:38:04,369 [main] ERROR [RegistrationInfoImpl] Component service:org.nuxeo.ecm.platform.ec.notification.service.NotificationService notification of application started failed: Cannot invoke "org.nuxeo.mail.MailServiceImpl.registerJndiSMTPSender(String)" because the return value of "org.nuxeo.runtime.api.Framework.getService(java.lang.Class)" is null
      java.lang.NullPointerException: Cannot invoke "org.nuxeo.mail.MailServiceImpl.registerJndiSMTPSender(String)" because the return value of "org.nuxeo.runtime.api.Framework.getService(java.lang.Class)" is null
      	at org.nuxeo.ecm.platform.ec.notification.service.NotificationService.start(NotificationService.java:153) ~[nuxeo-platform-notification-2023.4.13.jar:?]
      	at org.nuxeo.runtime.model.impl.RegistrationInfoImpl.start(RegistrationInfoImpl.java:350) ~[nuxeo-runtime-2023.4.13.jar:?]
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: