NPE in generic mail service

XMLWordPrintable

    • 6

      We're seeing this in the EACJ logs:

      2013-10-09 18:57:13,907 QuartzScheduler_Worker-2 ERROR ServiceRunner    Generic Comment-from-email service [atlassian.mail.incoming.mailfetcherservice] Generic Comment-from-email service[10050]: Exception: null
      java.lang.NullPointerException        at com.atlassian.jira.mail.MailThreadManagerImpl.parseIssueFromMessageId(MailThreadManagerImpl.java:316)
              at com.atlassian.jira.mail.MailThreadManagerImpl.getAssociatedIssueFromMessageId(MailThreadManagerImpl.java:286)        at com.atlassian.jira.mail.MailThreadManagerImpl.getAssociatedIssueObject(MailThreadManagerImpl.java:207)
              at com.atlassian.jira.plugins.mail.handlers.AbstractMessageHandler.getAssociatedIssue(AbstractMessageHandler.java:1393)        at com.atlassian.jira.plugins.mail.handlers.CreateOrCommentHandler.handleMessage(CreateOrCommentHandler.java:74)
              at com.atlassian.jira.service.services.mail.MailFetcherService$1.process(MailFetcherService.java:400)        at com.atlassian.jira.service.services.mail.MailFetcherService$MessageProviderImpl.getAndProcessMail(MailFetcherService.java:293)
              at com.atlassian.jira.service.services.mail.MailFetcherService.runImpl(MailFetcherService.java:388)        at com.atlassian.jira.service.services.file.AbstractMessageHandlingService.run(AbstractMessageHandlingService.java:257)
              at com.atlassian.jira.service.JiraServiceContainerImpl.run(JiraServiceContainerImpl.java:61)        at com.atlassian.jira.service.ServiceRunner.execute(ServiceRunner.java:48)
              at org.quartz.core.JobRunShell.run(JobRunShell.java:195)        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
      2013-10-09 18:57:14,011 QuartzScheduler_Worker-2 ERROR ServiceRunner    Generic Comment-from-email service [atlassian.mail.incoming.mailfetcherservice] Generic Comment-from-email service[10050]: Exception: null
      java.lang.NullPointerException        at com.atlassian.jira.mail.MailThreadManagerImpl.parseIssueFromMessageId(MailThreadManagerImpl.java:316)
              at com.atlassian.jira.mail.MailThreadManagerImpl.getAssociatedIssueFromMessageId(MailThreadManagerImpl.java:286)        at com.atlassian.jira.mail.MailThreadManagerImpl.getAssociatedIssueObject(MailThreadManagerImpl.java:207)
              at com.atlassian.jira.plugins.mail.handlers.AbstractMessageHandler.getAssociatedIssue(AbstractMessageHandler.java:1393)        at com.atlassian.jira.plugins.mail.handlers.CreateOrCommentHandler.handleMessage(CreateOrCommentHandler.java:74)
              at com.atlassian.jira.service.services.mail.MailFetcherService$1.process(MailFetcherService.java:400)        at com.atlassian.jira.service.services.mail.MailFetcherService$MessageProviderImpl.getAndProcessMail(MailFetcherService.java:293)
              at com.atlassian.jira.service.services.mail.MailFetcherService.runImpl(MailFetcherService.java:388)
              at com.atlassian.jira.service.services.file.AbstractMessageHandlingService.run(AbstractMessageHandlingService.java:257)
              at com.atlassian.jira.service.JiraServiceContainerImpl.run(JiraServiceContainerImpl.java:61)
              at com.atlassian.jira.service.ServiceRunner.execute(ServiceRunner.java:48)
              at org.quartz.core.JobRunShell.run(JobRunShell.java:195)
              at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
      

      This appears to be caused by either of the following scenarios:

      • We could not find an issue with the id specified in the email in JIRA (possibly caused by issues being deleted). This should be ok as there's no issue to update. However, it kind of sucks for the user replying to the email as they have no idea that the issue he's replying to is gone from JIRA so his update was not processed successfully. Having said that, I see no easy way around that.
      • The issue has a 'null' created date. This is a data integrity issue, as all issues should have a created date, but we should definitely handle the scenario better. In this case, the issue that was replied to in the email will not be updated by the handler.

            Assignee:
            Oswaldo Hernandez (Inactive)
            Reporter:
            Eric Dalgliesh
            Votes:
            3 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: