-
Type: Task
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 2023.10
-
Component/s: ColdStorage
-
Team:PLATFORM
-
Sprint:nxplatform #105
-
Story Points:1
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:?]
- is caused by
-
NXP-32029 Factorize email sending code
- Resolved