Uploaded image for project: 'JOC - JobScheduler Operations Center'
  1. JOC - JobScheduler Operations Center
  2. JOC-1357

Monitor Service - Mail Notification NPE if Job Notification setting 'Mail on' does not match the configured CONFIGURATION/Notification type and 'Mail to' is empty

    XMLWordPrintable

Details

    • Fix
    • Status: Released (View Workflow)
    • Minor
    • Resolution: Fixed
    • 2.0.0
    • 2.4.1, 2.5.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
      • 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.

      Workaround

      Attachments

        Issue Links

          Activity

            People

              re Robert Ehrlich
              re Robert Ehrlich
              Pratishtha Pandey Pratishtha Pandey
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: