Details
-
Fix
-
Status: Released (View Workflow)
-
Minor
-
Resolution: Fixed
-
2.0.0
-
None
-
None
Description
Current Situation
When a Job configured with the following Notification settings:
- Mail on is not empty but does not correspond to the configured CONFIGURATION/Notification type
- Mail to is empty
the Mail Notification throws a NPE exception:c.s.j.m.m.NotifierModel - java.lang.NullPointerException java.lang.NullPointerException: null at com.sos.joc.monitoring.notification.notifier.NotifierMail.checkJobNotificationTypes(NotifierMail.java:313) ~[sos-joc-monitoring-2.2.3.jar:?] at com.sos.joc.monitoring.notification.notifier.NotifierMail.checkJobNotification(NotifierMail.java:262) ~[sos-joc-monitoring-2.2.3.jar:?] at com.sos.joc.monitoring.notification.notifier.NotifierMail.notify(NotifierMail.java:56) ~[sos-joc-monitoring-2.2.3.jar:?]
Desired Behaviour
The Mail Notification should not throw any NPE.
Test Instructions
- CONFIGURATION/Inventory
- configure a shell job:
- Job Properties: Script
- exit 1
- Notification: Mail on
- SUCCESS
- Job Properties: Script
- configure a shell job:
- CONFIGURATION/Notification
- configure a mail notification with the type ERROR.
- Deploy an run the configured workflow.
- Expected result:
- a Mail Notification should not be sent
- because Notification type ERROR does not correspond to the Job Notification type SUCCESS.
- the log file service-monitor.log should not contain any NPE exception.
- a Mail Notification should not be sent
Workaround
- Apply the following patch for JOC Cockpit 2.2.3:
- https://download.sos-berlin.com/patches/2.2.3-patch/patch_20220809_JITL-687_JITL-701_JOC-1357_on_2.2.3_JOC.zip
- Please refere to the documentation JS7 - Patches for JOC Cockpit
- https://download.sos-berlin.com/patches/2.2.3-patch/patch_20220809_JITL-687_JITL-701_JOC-1357_on_2.2.3_JOC.zip