Uploaded image for project: 'JITL - JobScheduler Integrated Template Library'
  1. JITL - JobScheduler Integrated Template Library
  2. JITL-687

The MailJob without Credential Store can throw a Null Pointer Exception

    XMLWordPrintable

Details

    • Fix
    • Status: Released (View Workflow)
    • Minor
    • Resolution: Fixed
    • 2.2.2
    • 2.3.0
    • None

    Description

      Current Situation

      • When the JITl com.sos.jitl.jobs.mail.MailJob does not use a Credential Store and does not set all of the the following arguments:
        • mail.smtp.host
        • mail.smtp.user
        • mail.smtp.password
      • then the MailJob throws a NPE exception:
        Caused by: java.lang.NullPointerException
        at java.util.Hashtable.put(Hashtable.java:460)
        at com.sos.commons.mail.SOSMail.addMailProperty(SOSMail.java:1225)
        at com.sos.commons.mail.SOSMail.useCredentialStoreArguments(SOSMail.java:594)
        at com.sos.commons.mail.SOSMail.sendJavaMail(SOSMail.java:475)
        at com.sos.commons.mail.SOSMail.send(SOSMail.java:471)
        at com.sos.jitl.jobs.mail.MailHandler.sendMail(MailHandler.java:112)

      Desired Behaviour

      • The MailJob should work correctly without any Null Pointer Exceptions.

      Test Instructions

      • MailJob
        • Without Credential Store
          • Configure the com.sos.jitl.jobs.mail.MailJob only with the following arguments:
            • mail.smtp.host
            • from
            • to
            • subject
            • body
          • Run this job. The job should not throw a NPE exception.
        • Check the Job functionaly when a Credential Store is used.
      • Additional testing: check jobs functionality with/without Credential Store for the following JITL-Jobs:
        • com.sos.jitl.jobs.mail.MailInboxJob
        • com.sos.jitl.jobs.db.oracle.PLSQLJob
        • com.sos.jitl.jobs.db.oracle.SQLPLUSJob

      Patch

      A Patch is available here
      Please refere to the documentation Patches for Agent
       

      Attachments

        Issue Links

          Activity

            People

              re Robert Ehrlich
              re Robert Ehrlich
              Divyani Rathore Divyani Rathore
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: