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

Monitor Service - Mail Notification NPE when mail.smtp.port is not set

    XMLWordPrintable

Details

    • Fix
    • Status: Released (View Workflow)
    • Minor
    • Resolution: Fixed
    • 2.0.0
    • 2.2.1
    • None
    • None

    Description

      Current Situation

      • When the mail.smtp.port setting is not configured for a Job Resource used by the MailFragment, the Mail Notification throws the following exception:
        • java.lang.Exception: error occurred on send: java.lang.NullPointerException
                 at com.sos.commons.mail.SOSMail.sendJavaMail(SOSMail.java:579)
                 at com.sos.commons.mail.SOSMail.send(SOSMail.java:470)
                 at com.sos.joc.monitoring.notification.notifier.NotifierMail.notify(NotifierMail.java:52)
                 ...

      Desired Behaviour

      • The SOSMail class should not throw any NPE but use java default port and not overwrite a possible original Java Mail error message.

      Test Instructions

      • CONFIGURATION/Inventory
        • configure a mail Job Resource without the mail.smtp.port setting
        • configure a JITL com.sos.jitl.jobs.mail.MailJob job
          • use the Job Resource
      • CONFIGURATION/Notification
        • configure a mail notitication for the MailJob with the types SUCCESS, ERROR
          • use the same Job Resource without the mail.smtp.port setting
      • Deploy and run the MailJob
        • check the notification results

      Attachments

        Issue Links

          Activity

            People

              re Robert Ehrlich
              re Robert Ehrlich
              Kanika Agrawal Kanika Agrawal
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: