Details
-
Fix
-
Status: Released (View Workflow)
-
Minor
-
Resolution: Fixed
-
2.2.2
-
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.
- Configure the com.sos.jitl.jobs.mail.MailJob only with the following arguments:
- Check the Job functionaly when a Credential Store is used.
- Without Credential Store
- 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