Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-11204

CreateOrCommentHandler: Attachment with invalid filename causes loop

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • 3.7.3
    • 3.6.3
    • Issue - Attachments
      • JIRA Enterprise Edition, Version: 3.6.4-#160
      • JBoss 4.0.3 SP1 on JDK5
      • Windows 2003
      • IMAP connection to MS Exchange

      Some emails contain strangely named attachements that causes the CreateOrCommentHandler to fail and retry consuming the email for ever, creating a new entry each time.

      The following stackfest unveil the drama in its full extent!

      Cheers,
      David

      ----------------------------

      09:58:12,299 INFO [MailUtils] Exception getting the content type of message - probably not of type 'String'javax.mail.internet.MimeMultipart
      09:58:12,815 INFO [CreateIssueHandler] Issue SALXE-1272 created
      09:58:12,893 WARN [DefaultAttachmentManager] Creating attachment without a file. Aborting
      09:58:13,049 ERROR [DefaultAttachmentManager] Could not move (or copy) attachment from C:\WINDOWS\TEMP\tempattach39525dat to e:\jira\data\attachment\SALXE\SALXE-1272\11507_mdsefc?a2125;MATT10CC18881P525527B525530S0: java.io.FileNotFoundException: e:\jira\data\attachment\SALXE\SALXE-1272\11507_mdsefc?a2125;MATT10CC18881P525527B525530S0 (The filename, directory name, or volume label syntax is incorrect)
      java.io.FileNotFoundException: e:\jira\data\attachment\SALXE\SALXE-1272\11507_mdsefc?a2125;MATT10CC18881P525527B525530S0 (The filename, directory name, or volume label syntax is incorrect)
      at java.io.FileOutputStream.open(Native Method)
      at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
      at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
      at com.atlassian.core.util.FileUtils.copyFile(FileUtils.java:62)
      at com.atlassian.jira.issue.managers.DefaultAttachmentManager.createAttachmentOnDisk(DefaultAttachmentManager.java:230)
      at com.atlassian.jira.issue.managers.DefaultAttachmentManager.createAttachment(DefaultAttachmentManager.java:205)
      at com.atlassian.jira.issue.managers.DefaultAttachmentManager.createAttachment(DefaultAttachmentManager.java:214)
      at com.atlassian.jira.service.util.handler.AbstractMessageHandler.createAttachmentWithPart(AbstractMessageHandler.java:297)
      at com.atlassian.jira.service.util.handler.AbstractMessageHandler.handleMultipart(AbstractMessageHandler.java:253)
      at com.atlassian.jira.service.util.handler.AbstractMessageHandler.createAttachmentsForMessage(AbstractMessageHandler.java:202)
      at com.atlassian.jira.service.util.handler.CreateIssueHandler.handleMessage(CreateIssueHandler.java:194)
      at com.atlassian.jira.service.util.handler.CreateOrCommentHandler.handleMessage(CreateOrCommentHandler.java:117)
      at com.atlassian.jira.service.services.mail.MailFetcherService.run(MailFetcherService.java:184)
      at com.atlassian.jira.service.JiraServiceContainerImpl.run(JiraServiceContainerImpl.java:67)
      at com.atlassian.jira.service.ServiceRunner.execute(ServiceRunner.java:48)
      at org.quartz.core.JobRunShell.run(JobRunShell.java:191)
      at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516)
      09:58:13,049 ERROR [AbstractMessageHandler] Exception while creating attachment for issue SALXE-1272: com.atlassian.jira.web.util.AttachmentException: Could not move (or copy) attachment from C:\WINDOWS\TEMP\tempattach39525dat to e:\jira\data\attachment\SALXE\SALXE-1272\11507_mdsefc?a2125;MATT10CC18881P525527B525530S0: java.io.FileNotFoundException: e:\jira\data\attachment\SALXE\SALXE-1272\11507_mdsefc?a2125;MATT10CC18881P525527B525530S0 (The filename, directory name, or volume label syntax is incorrect)
      com.atlassian.jira.web.util.AttachmentException: Could not move (or copy) attachment from C:\WINDOWS\TEMP\tempattach39525dat to e:\jira\data\attachment\SALXE\SALXE-1272\11507_mdsefc?a2125;MATT10CC18881P525527B525530S0: java.io.FileNotFoundException: e:\jira\data\attachment\SALXE\SALXE-1272\11507_mdsefc?a2125;MATT10CC18881P525527B525530S0 (The filename, directory name, or volume label syntax is incorrect)
      at com.atlassian.jira.issue.managers.DefaultAttachmentManager.createAttachmentOnDisk(DefaultAttachmentManager.java:240)
      at com.atlassian.jira.issue.managers.DefaultAttachmentManager.createAttachment(DefaultAttachmentManager.java:205)
      at com.atlassian.jira.issue.managers.DefaultAttachmentManager.createAttachment(DefaultAttachmentManager.java:214)
      at com.atlassian.jira.service.util.handler.AbstractMessageHandler.createAttachmentWithPart(AbstractMessageHandler.java:297)
      at com.atlassian.jira.service.util.handler.AbstractMessageHandler.handleMultipart(AbstractMessageHandler.java:253)
      at com.atlassian.jira.service.util.handler.AbstractMessageHandler.createAttachmentsForMessage(AbstractMessageHandler.java:202)
      at com.atlassian.jira.service.util.handler.CreateIssueHandler.handleMessage(CreateIssueHandler.java:194)
      at com.atlassian.jira.service.util.handler.CreateOrCommentHandler.handleMessage(CreateOrCommentHandler.java:117)
      at com.atlassian.jira.service.services.mail.MailFetcherService.run(MailFetcherService.java:184)
      at com.atlassian.jira.service.JiraServiceContainerImpl.run(JiraServiceContainerImpl.java:67)
      at com.atlassian.jira.service.ServiceRunner.execute(ServiceRunner.java:48)
      at org.quartz.core.JobRunShell.run(JobRunShell.java:191)
      at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516)
      09:58:13,049 ERROR [CreateIssueHandler] Could not create issue!
      java.io.IOException: Could not move (or copy) attachment from C:\WINDOWS\TEMP\tempattach39525dat to e:\jira\data\attachment\SALXE\SALXE-1272\11507_mdsefc?a2125;MATT10CC18881P525527B525530S0: java.io.FileNotFoundException: e:\jira\data\attachment\SALXE\SALXE-1272\11507_mdsefc?a2125;MATT10CC18881P525527B525530S0 (The filename, directory name, or volume label syntax is incorrect)
      at com.atlassian.jira.service.util.handler.AbstractMessageHandler.createAttachmentWithPart(AbstractMessageHandler.java:312)
      at com.atlassian.jira.service.util.handler.AbstractMessageHandler.handleMultipart(AbstractMessageHandler.java:253)
      at com.atlassian.jira.service.util.handler.AbstractMessageHandler.createAttachmentsForMessage(AbstractMessageHandler.java:202)
      at com.atlassian.jira.service.util.handler.CreateIssueHandler.handleMessage(CreateIssueHandler.java:194)
      at com.atlassian.jira.service.util.handler.CreateOrCommentHandler.handleMessage(CreateOrCommentHandler.java:117)
      at com.atlassian.jira.service.services.mail.MailFetcherService.run(MailFetcherService.java:184)
      at com.atlassian.jira.service.JiraServiceContainerImpl.run(JiraServiceContainerImpl.java:67)
      at com.atlassian.jira.service.ServiceRunner.execute(ServiceRunner.java:48)
      at org.quartz.core.JobRunShell.run(JobRunShell.java:191)
      at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516)

              sam@atlassian.com Sam Chang [Atlassian]
              2e3a03325e96 David Dossot
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h
                  1h