NullPointerException at biz.artemissoftware.confluence.sendemailtopage.EMailCheck.openFolders(EMailCheck.java:643)

Description

After installing Send EMail to Page and configuring it to use a gmail account for the incoming server:

  • Disabled the Scheduled Job named "SendEMailToPage Check EMail Server Job" so I could control all email processing exclusively via the "Check EMail Now" button in the Send EMail to Page admin tool.

  • Successfully used "Test Configuration" button

  • Used "Check EMail Now" button a few times

  • Sent emails, used "Check EMail Now" button, emails were properly processed

  • Used Download Log Files to view the SendEmailToPageConfPlugin.log and noticed:

It happend 2 times, exactly 5 minutes apart.

ROOT CAUSE:

  • Before the Send EMail to Page app is configured, immediately after installation, the Scheduled Job named "SendEMailToPage Check EMail Server Job" is enabled and configured to run every 5 minutes. Every 5 minutes it fails to connect to the incoming email server and this is what that failure looks like. (I did not disable the scheduled job until 10 minutes after I did the app install).

SOLUTION:

  • Scheduled Job named "SendEMailToPage Check EMail Server Job" could be disabled upon installation. Add enable/disable detector in the admin tool and instructions for enabling it to the admin tool and in the User Guide.

  • After EMailCheck.connectToServer() fails (1st logline), do not proceed to EMailCheck.openFolders() which then fails with NullPointerException (2nd logline). After the first failure just fail the entire scheduled job.

Freshdesk Tickets

None

Create a Support Ticket

Fixed

Assignee

Ture Hoefner

Reporter

Ture Hoefner