javax.mail.MessageRemovedException

Atlassian JIRA | Jaakko Linnosaari [Polar Shift] | 2 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Order of events: # mail handler 1 starts processing a message with attachments; log: {code}Issue XX-1234 created{code} # mail handler 2 starts processing the same message and MailFetcherService's getAssociatedIssueKey detects existing issue with the Message-ID; log: {code}Deleting message 'foo' without processing in order to avoid creating duplicate issues/comments. This message has already been partially processed, associated issue key: XX-1234{code} # mail handler 1 tries to process attachment; log: {code}Exception while adding attachments to XX-1234. Some attachments from the message might be missing. Making a note on the issue. java.io.IOException at javax.mail.internet.MimePartDataSource.getInputStream(MimePartDataSource.java:113) at javax.activation.DataSourceDataContentHandler.getContent(DataHandler.java:797) at javax.activation.DataHandler.getContent(DataHandler.java:542) at javax.mail.internet.MimeBodyPart.getContent(MimeBodyPart.java:637) at com.atlassian.mail.MailUtils.isContentEmpty(MailUtils.java:638) at com.atlassian.jira.plugins.mail.handlers.AbstractMessageHandler.attachAttachmentsParts(AbstractMessageHandler.java:912) at com.atlassian.jira.plugins.mail.handlers.AbstractMessageHandler.shouldAttach(AbstractMessageHandler.java:801) at com.atlassian.jira.plugins.mail.handlers.AbstractMessageHandler$1.handlePart(AbstractMessageHandler.java:603) at com.atlassian.jira.plugins.mail.handlers.AbstractMessageHandler.handleMultipart(AbstractMessageHandler.java:700) at com.atlassian.jira.plugins.mail.handlers.AbstractMessageHandler.createAttachmentsForMessage(AbstractMessageHandler.java:661) at com.atlassian.jira.plugins.mail.handlers.CreateIssueHandler.addCcWatchersAndAttachments(CreateIssueHandler.java:300) at com.atlassian.jira.plugins.mail.handlers.CreateIssueHandler.handleMessage(CreateIssueHandler.java:276) at com.metainf.jira.plugin.emailissue.handler.CreateAndLinkHandler.handleMessage(CreateAndLinkHandler.java:48) at com.metainf.jira.plugin.emailissue.handler.AbstractMailHandler.handleMessage(AbstractMailHandler.java:96) at com.metainf.jira.plugin.emailissue.handler.EmailThisIssueMailHandler.handleMessage(EmailThisIssueMailHandler.java:419) at com.atlassian.jira.service.services.mail.MailFetcherService$1.process(MailFetcherService.java:438) at com.atlassian.jira.service.services.mail.MailFetcherService$MessageProviderImpl.getAndProcessMail(MailFetcherService.java:304) at com.atlassian.jira.service.services.mail.MailFetcherService.runImpl(MailFetcherService.java:426) at com.atlassian.jira.service.services.file.AbstractMessageHandlingService.run(AbstractMessageHandlingService.java:263) at com.atlassian.jira.service.JiraServiceContainerImpl.run(JiraServiceContainerImpl.java:66) at com.atlassian.jira.service.ServiceRunner.runService(ServiceRunner.java:75) at com.atlassian.jira.service.ServiceRunner.runServiceId(ServiceRunner.java:53) at com.atlassian.jira.service.ServiceRunner.runJob(ServiceRunner.java:36) at com.atlassian.scheduler.core.JobLauncher.runJob(JobLauncher.java:135) at com.atlassian.scheduler.core.JobLauncher.launchAndBuildResponse(JobLauncher.java:101) at com.atlassian.scheduler.core.JobLauncher.launch(JobLauncher.java:80) at com.atlassian.scheduler.quartz1.Quartz1Job.execute(Quartz1Job.java:32) at org.quartz.core.JobRunShell.run(JobRunShell.java:223) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549) {code} and {code} javax.mail.MessageRemovedException at com.sun.mail.imap.IMAPMessage.checkExpunged(IMAPMessage.java:205) at com.sun.mail.imap.IMAPMessage.getFrom(IMAPMessage.java:236) at com.metainf.jira.plugin.emailissue.handler.EmailThisIssueMailHandler.saveSenderInField(EmailThisIssueMailHandler.java:622) at com.metainf.jira.plugin.emailissue.handler.EmailThisIssueMailHandler.access$100(EmailThisIssueMailHandler.java:59) at com.metainf.jira.plugin.emailissue.handler.EmailThisIssueMailHandler$1.createComment(EmailThisIssueMailHandler.java:160) at com.metainf.jira.plugin.emailissue.handler.IssueSupportingMessageHandlerContext.createComment(IssueSupportingMessageHandlerContext.java:39) at com.metainf.jira.plugin.emailissue.handler.IssueSupportingMessageHandlerContext.createComment(IssueSupportingMessageHandlerContext.java:39) at com.atlassian.jira.plugins.mail.handlers.AbstractMessageHandler.addCommentIndicatingAttachmentFailureAndMarkForDeletion(AbstractMessageHandler.java:865) at com.atlassian.jira.plugins.mail.handlers.CreateIssueHandler.addCcWatchersAndAttachments(CreateIssueHandler.java:313) at com.atlassian.jira.plugins.mail.handlers.CreateIssueHandler.handleMessage(CreateIssueHandler.java:276) at com.metainf.jira.plugin.emailissue.handler.CreateAndLinkHandler.handleMessage(CreateAndLinkHandler.java:48) at com.metainf.jira.plugin.emailissue.handler.AbstractMailHandler.handleMessage(AbstractMailHandler.java:96) at com.metainf.jira.plugin.emailissue.handler.EmailThisIssueMailHandler.handleMessage(EmailThisIssueMailHandler.java:419) at com.atlassian.jira.service.services.mail.MailFetcherService$1.process(MailFetcherService.java:438) at com.atlassian.jira.service.services.mail.MailFetcherService$MessageProviderImpl.getAndProcessMail(MailFetcherService.java:304) at com.atlassian.jira.service.services.mail.MailFetcherService.runImpl(MailFetcherService.java:426) at com.atlassian.jira.service.services.file.AbstractMessageHandlingService.run(AbstractMessageHandlingService.java:263) at com.atlassian.jira.service.JiraServiceContainerImpl.run(JiraServiceContainerImpl.java:66) at com.atlassian.jira.service.ServiceRunner.runService(ServiceRunner.java:75) at com.atlassian.jira.service.ServiceRunner.runServiceId(ServiceRunner.java:53) at com.atlassian.jira.service.ServiceRunner.runJob(ServiceRunner.java:36) at com.atlassian.scheduler.core.JobLauncher.runJob(JobLauncher.java:135) at com.atlassian.scheduler.core.JobLauncher.launchAndBuildResponse(JobLauncher.java:101) at com.atlassian.scheduler.core.JobLauncher.launch(JobLauncher.java:80) at com.atlassian.scheduler.quartz1.Quartz1Job.execute(Quartz1Job.java:32) at org.quartz.core.JobRunShell.run(JobRunShell.java:223) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549) {code}

    Atlassian JIRA | 2 years ago | Jaakko Linnosaari [Polar Shift]
    javax.mail.MessageRemovedException
  2. 0

    Order of events: # mail handler 1 starts processing a message with attachments; log: {code}Issue XX-1234 created{code} # mail handler 2 starts processing the same message and MailFetcherService's getAssociatedIssueKey detects existing issue with the Message-ID; log: {code}Deleting message 'foo' without processing in order to avoid creating duplicate issues/comments. This message has already been partially processed, associated issue key: XX-1234{code} # mail handler 1 tries to process attachment; log: {code}Exception while adding attachments to XX-1234. Some attachments from the message might be missing. Making a note on the issue. java.io.IOException at javax.mail.internet.MimePartDataSource.getInputStream(MimePartDataSource.java:113) at javax.activation.DataSourceDataContentHandler.getContent(DataHandler.java:797) at javax.activation.DataHandler.getContent(DataHandler.java:542) at javax.mail.internet.MimeBodyPart.getContent(MimeBodyPart.java:637) at com.atlassian.mail.MailUtils.isContentEmpty(MailUtils.java:638) at com.atlassian.jira.plugins.mail.handlers.AbstractMessageHandler.attachAttachmentsParts(AbstractMessageHandler.java:912) at com.atlassian.jira.plugins.mail.handlers.AbstractMessageHandler.shouldAttach(AbstractMessageHandler.java:801) at com.atlassian.jira.plugins.mail.handlers.AbstractMessageHandler$1.handlePart(AbstractMessageHandler.java:603) at com.atlassian.jira.plugins.mail.handlers.AbstractMessageHandler.handleMultipart(AbstractMessageHandler.java:700) at com.atlassian.jira.plugins.mail.handlers.AbstractMessageHandler.createAttachmentsForMessage(AbstractMessageHandler.java:661) at com.atlassian.jira.plugins.mail.handlers.CreateIssueHandler.addCcWatchersAndAttachments(CreateIssueHandler.java:300) at com.atlassian.jira.plugins.mail.handlers.CreateIssueHandler.handleMessage(CreateIssueHandler.java:276) at com.metainf.jira.plugin.emailissue.handler.CreateAndLinkHandler.handleMessage(CreateAndLinkHandler.java:48) at com.metainf.jira.plugin.emailissue.handler.AbstractMailHandler.handleMessage(AbstractMailHandler.java:96) at com.metainf.jira.plugin.emailissue.handler.EmailThisIssueMailHandler.handleMessage(EmailThisIssueMailHandler.java:419) at com.atlassian.jira.service.services.mail.MailFetcherService$1.process(MailFetcherService.java:438) at com.atlassian.jira.service.services.mail.MailFetcherService$MessageProviderImpl.getAndProcessMail(MailFetcherService.java:304) at com.atlassian.jira.service.services.mail.MailFetcherService.runImpl(MailFetcherService.java:426) at com.atlassian.jira.service.services.file.AbstractMessageHandlingService.run(AbstractMessageHandlingService.java:263) at com.atlassian.jira.service.JiraServiceContainerImpl.run(JiraServiceContainerImpl.java:66) at com.atlassian.jira.service.ServiceRunner.runService(ServiceRunner.java:75) at com.atlassian.jira.service.ServiceRunner.runServiceId(ServiceRunner.java:53) at com.atlassian.jira.service.ServiceRunner.runJob(ServiceRunner.java:36) at com.atlassian.scheduler.core.JobLauncher.runJob(JobLauncher.java:135) at com.atlassian.scheduler.core.JobLauncher.launchAndBuildResponse(JobLauncher.java:101) at com.atlassian.scheduler.core.JobLauncher.launch(JobLauncher.java:80) at com.atlassian.scheduler.quartz1.Quartz1Job.execute(Quartz1Job.java:32) at org.quartz.core.JobRunShell.run(JobRunShell.java:223) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549) {code} and {code} javax.mail.MessageRemovedException at com.sun.mail.imap.IMAPMessage.checkExpunged(IMAPMessage.java:205) at com.sun.mail.imap.IMAPMessage.getFrom(IMAPMessage.java:236) at com.metainf.jira.plugin.emailissue.handler.EmailThisIssueMailHandler.saveSenderInField(EmailThisIssueMailHandler.java:622) at com.metainf.jira.plugin.emailissue.handler.EmailThisIssueMailHandler.access$100(EmailThisIssueMailHandler.java:59) at com.metainf.jira.plugin.emailissue.handler.EmailThisIssueMailHandler$1.createComment(EmailThisIssueMailHandler.java:160) at com.metainf.jira.plugin.emailissue.handler.IssueSupportingMessageHandlerContext.createComment(IssueSupportingMessageHandlerContext.java:39) at com.metainf.jira.plugin.emailissue.handler.IssueSupportingMessageHandlerContext.createComment(IssueSupportingMessageHandlerContext.java:39) at com.atlassian.jira.plugins.mail.handlers.AbstractMessageHandler.addCommentIndicatingAttachmentFailureAndMarkForDeletion(AbstractMessageHandler.java:865) at com.atlassian.jira.plugins.mail.handlers.CreateIssueHandler.addCcWatchersAndAttachments(CreateIssueHandler.java:313) at com.atlassian.jira.plugins.mail.handlers.CreateIssueHandler.handleMessage(CreateIssueHandler.java:276) at com.metainf.jira.plugin.emailissue.handler.CreateAndLinkHandler.handleMessage(CreateAndLinkHandler.java:48) at com.metainf.jira.plugin.emailissue.handler.AbstractMailHandler.handleMessage(AbstractMailHandler.java:96) at com.metainf.jira.plugin.emailissue.handler.EmailThisIssueMailHandler.handleMessage(EmailThisIssueMailHandler.java:419) at com.atlassian.jira.service.services.mail.MailFetcherService$1.process(MailFetcherService.java:438) at com.atlassian.jira.service.services.mail.MailFetcherService$MessageProviderImpl.getAndProcessMail(MailFetcherService.java:304) at com.atlassian.jira.service.services.mail.MailFetcherService.runImpl(MailFetcherService.java:426) at com.atlassian.jira.service.services.file.AbstractMessageHandlingService.run(AbstractMessageHandlingService.java:263) at com.atlassian.jira.service.JiraServiceContainerImpl.run(JiraServiceContainerImpl.java:66) at com.atlassian.jira.service.ServiceRunner.runService(ServiceRunner.java:75) at com.atlassian.jira.service.ServiceRunner.runServiceId(ServiceRunner.java:53) at com.atlassian.jira.service.ServiceRunner.runJob(ServiceRunner.java:36) at com.atlassian.scheduler.core.JobLauncher.runJob(JobLauncher.java:135) at com.atlassian.scheduler.core.JobLauncher.launchAndBuildResponse(JobLauncher.java:101) at com.atlassian.scheduler.core.JobLauncher.launch(JobLauncher.java:80) at com.atlassian.scheduler.quartz1.Quartz1Job.execute(Quartz1Job.java:32) at org.quartz.core.JobRunShell.run(JobRunShell.java:223) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549) {code}

    Atlassian JIRA | 2 years ago | Jaakko Linnosaari [Polar Shift]
    javax.mail.MessageRemovedException

    Root Cause Analysis

    1. javax.mail.MessageRemovedException

      No message provided

      at com.sun.mail.imap.IMAPMessage.checkExpunged()
    2. JavaMail API (compat)
      IMAPMessage.getFrom
      1. com.sun.mail.imap.IMAPMessage.checkExpunged(IMAPMessage.java:205)
      2. com.sun.mail.imap.IMAPMessage.getFrom(IMAPMessage.java:236)
      2 frames
    3. com.metainf.jira
      IssueSupportingMessageHandlerContext.createComment
      1. com.metainf.jira.plugin.emailissue.handler.EmailThisIssueMailHandler.saveSenderInField(EmailThisIssueMailHandler.java:622)
      2. com.metainf.jira.plugin.emailissue.handler.EmailThisIssueMailHandler.access$100(EmailThisIssueMailHandler.java:59)
      3. com.metainf.jira.plugin.emailissue.handler.EmailThisIssueMailHandler$1.createComment(EmailThisIssueMailHandler.java:160)
      4. com.metainf.jira.plugin.emailissue.handler.IssueSupportingMessageHandlerContext.createComment(IssueSupportingMessageHandlerContext.java:39)
      5. com.metainf.jira.plugin.emailissue.handler.IssueSupportingMessageHandlerContext.createComment(IssueSupportingMessageHandlerContext.java:39)
      5 frames
    4. com.atlassian.jira
      CreateIssueHandler.handleMessage
      1. com.atlassian.jira.plugins.mail.handlers.AbstractMessageHandler.addCommentIndicatingAttachmentFailureAndMarkForDeletion(AbstractMessageHandler.java:865)
      2. com.atlassian.jira.plugins.mail.handlers.CreateIssueHandler.addCcWatchersAndAttachments(CreateIssueHandler.java:313)
      3. com.atlassian.jira.plugins.mail.handlers.CreateIssueHandler.handleMessage(CreateIssueHandler.java:276)
      3 frames
    5. com.metainf.jira
      EmailThisIssueMailHandler.handleMessage
      1. com.metainf.jira.plugin.emailissue.handler.CreateAndLinkHandler.handleMessage(CreateAndLinkHandler.java:48)
      2. com.metainf.jira.plugin.emailissue.handler.AbstractMailHandler.handleMessage(AbstractMailHandler.java:96)
      3. com.metainf.jira.plugin.emailissue.handler.EmailThisIssueMailHandler.handleMessage(EmailThisIssueMailHandler.java:419)
      3 frames
    6. com.atlassian.jira
      ServiceRunner.runJob
      1. com.atlassian.jira.service.services.mail.MailFetcherService$1.process(MailFetcherService.java:438)
      2. com.atlassian.jira.service.services.mail.MailFetcherService$MessageProviderImpl.getAndProcessMail(MailFetcherService.java:304)
      3. com.atlassian.jira.service.services.mail.MailFetcherService.runImpl(MailFetcherService.java:426)
      4. com.atlassian.jira.service.services.file.AbstractMessageHandlingService.run(AbstractMessageHandlingService.java:263)
      5. com.atlassian.jira.service.JiraServiceContainerImpl.run(JiraServiceContainerImpl.java:66)
      6. com.atlassian.jira.service.ServiceRunner.runService(ServiceRunner.java:75)
      7. com.atlassian.jira.service.ServiceRunner.runServiceId(ServiceRunner.java:53)
      8. com.atlassian.jira.service.ServiceRunner.runJob(ServiceRunner.java:36)
      8 frames
    7. com.atlassian.scheduler
      Quartz1Job.execute
      1. com.atlassian.scheduler.core.JobLauncher.runJob(JobLauncher.java:135)
      2. com.atlassian.scheduler.core.JobLauncher.launchAndBuildResponse(JobLauncher.java:101)
      3. com.atlassian.scheduler.core.JobLauncher.launch(JobLauncher.java:80)
      4. com.atlassian.scheduler.quartz1.Quartz1Job.execute(Quartz1Job.java:32)
      4 frames
    8. quartz
      SimpleThreadPool$WorkerThread.run
      1. org.quartz.core.JobRunShell.run(JobRunShell.java:223)
      2. org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)
      2 frames