com.atlassian.jira.exception.AttachmentNotFoundException

Atlassian JIRA | Jeff Turner | 8 years ago
  1. 0

    I am getting these errors from the activity stream: TP-Processor23 ERROR [atlassian.streams.servlet.StreamsActivityServlet] Error getting activity com.atlassian.jira.exception.AttachmentNotFoundException at com.atlassian.jira.issue.managers.DefaultAttachmentManager.getAttachment(DefaultAttachmentManager.java:75) at com.atlassian.streams.jira.JiraSyndEntryFactoryImpl.extractAttachments(JiraSyndEntryFactoryImpl.java:309) at com.atlassian.streams.jira.JiraSyndEntryFactoryImpl.buildAttachments(JiraSyndEntryFactoryImpl.java:250) at com.atlassian.streams.jira.JiraSyndEntryFactoryImpl.buildChanged(JiraSyndEntryFactoryImpl.java:174) at com.atlassian.streams.jira.JiraSyndEntryFactoryImpl.getSyndEntries(JiraSyndEntryFactoryImpl.java:96) at com.atlassian.streams.jira.JiraStreamsActivityProvider.getActivityFeed(JiraStreamsActivityProvider.java:111) at com.atlassian.streams.servlet.StreamsActivityServlet$1.doInTransaction(StreamsActivityServlet.java:123) at com.atlassian.sal.core.transaction.NoOpTransactionTemplate.execute(NoOpTransactionTemplate.java:14) at com.atlassian.streams.servlet.StreamsActivityServlet.doGet(StreamsActivityServlet.java:115) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at com.atlassian.plugin.descriptors.servlet.DelegatingPluginServlet.service(DelegatingPluginServlet.java:48) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) Unfortunately, although AttachmentNotFoundException takes the attachment ID in its constructor, it doesn't do anything with it, so the user is left in the dark as to which attachment is missing.

    Atlassian JIRA | 8 years ago | Jeff Turner
    com.atlassian.jira.exception.AttachmentNotFoundException
  2. 0

    I am getting these errors from the activity stream: TP-Processor23 ERROR [atlassian.streams.servlet.StreamsActivityServlet] Error getting activity com.atlassian.jira.exception.AttachmentNotFoundException at com.atlassian.jira.issue.managers.DefaultAttachmentManager.getAttachment(DefaultAttachmentManager.java:75) at com.atlassian.streams.jira.JiraSyndEntryFactoryImpl.extractAttachments(JiraSyndEntryFactoryImpl.java:309) at com.atlassian.streams.jira.JiraSyndEntryFactoryImpl.buildAttachments(JiraSyndEntryFactoryImpl.java:250) at com.atlassian.streams.jira.JiraSyndEntryFactoryImpl.buildChanged(JiraSyndEntryFactoryImpl.java:174) at com.atlassian.streams.jira.JiraSyndEntryFactoryImpl.getSyndEntries(JiraSyndEntryFactoryImpl.java:96) at com.atlassian.streams.jira.JiraStreamsActivityProvider.getActivityFeed(JiraStreamsActivityProvider.java:111) at com.atlassian.streams.servlet.StreamsActivityServlet$1.doInTransaction(StreamsActivityServlet.java:123) at com.atlassian.sal.core.transaction.NoOpTransactionTemplate.execute(NoOpTransactionTemplate.java:14) at com.atlassian.streams.servlet.StreamsActivityServlet.doGet(StreamsActivityServlet.java:115) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at com.atlassian.plugin.descriptors.servlet.DelegatingPluginServlet.service(DelegatingPluginServlet.java:48) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) Unfortunately, although AttachmentNotFoundException takes the attachment ID in its constructor, it doesn't do anything with it, so the user is left in the dark as to which attachment is missing.

    Atlassian JIRA | 8 years ago | Jeff Turner
    com.atlassian.jira.exception.AttachmentNotFoundException
  3. 0

    Steps to create problematic image: # On a Mac using OS X 10.5 or 10.6 # Use Preview to capture part of the screen (_File > Grab_) # Save the image in GIF format. # Attach the GIF image to a JIRA issue, then open that issue. Problem: * Thumbnail does not appear in image attachments * ERRORS appear in logs: {noformat} 2009-10-28 10:51:57,863 http-8080-Processor21 ERROR [core.util.thumbnail.Thumber] Unable to create thumbnail image for id 10000 javax.imageio.IIOException: Unexpected block type 0! at com.sun.imageio.plugins.gif.GIFImageReader.readMetadata(GIFImageReader.java:721) at com.sun.imageio.plugins.gif.GIFImageReader.read(GIFImageReader.java:954) at javax.imageio.ImageIO.read(ImageIO.java:1400) at javax.imageio.ImageIO.read(ImageIO.java:1322) at com.atlassian.core.util.thumbnail.Thumber.getImage(Thumber.java:281) at com.atlassian.core.util.thumbnail.Thumber.createThumbnail(Thumber.java:241) at com.atlassian.core.util.thumbnail.Thumber.retrieveOrCreateThumbNail(Thumber.java:215) at com.atlassian.core.util.thumbnail.Thumber.retrieveOrCreateThumbNail(Thumber.java:86) at com.atlassian.jira.issue.thumbnail.DefaultThumbnailManager.getThumbnail(DefaultThumbnailManager.java:104) at com.atlassian.jira.issue.thumbnail.DefaultThumbnailManager.getThumbnails(DefaultThumbnailManager.java:50) {noformat} {noformat} 2009-10-28 10:51:57,874 http-8080-Processor21 ERROR [webwork.util.ValueStack] METHOD: "attachment", exception: com.atlassian.jira.exception.AttachmentNotFoundException: null at com.atlassian.jira.issue.managers.DefaultAttachmentManager.getAttachment(DefaultAttachmentManager.java:85) {noformat} {noformat} 2009-10-28 10:51:57,882 http-8080-Processor21 ERROR [webwork.util.ValueStack] METHOD: "latestFile", exception: java.lang.NullPointerException at com.atlassian.jira.web.bean.LatestFileBean.isLatestFile(LatestFileBean.java:44) {noformat} (I attached a full log file for posterity) I tested this against JIRA 3.13.5 and the issue does not occur - this is new in 4.0. Using this method of doing screen grabs works if you save to JPEG instead of GIF.

    Atlassian JIRA | 7 years ago | Michael Tokar
    com.atlassian.jira.exception.AttachmentNotFoundException: null
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Steps to create problematic image: # On a Mac using OS X 10.5 or 10.6 # Use Preview to capture part of the screen (_File > Grab_) # Save the image in GIF format. # Attach the GIF image to a JIRA issue, then open that issue. Problem: * Thumbnail does not appear in image attachments * ERRORS appear in logs: {noformat} 2009-10-28 10:51:57,863 http-8080-Processor21 ERROR [core.util.thumbnail.Thumber] Unable to create thumbnail image for id 10000 javax.imageio.IIOException: Unexpected block type 0! at com.sun.imageio.plugins.gif.GIFImageReader.readMetadata(GIFImageReader.java:721) at com.sun.imageio.plugins.gif.GIFImageReader.read(GIFImageReader.java:954) at javax.imageio.ImageIO.read(ImageIO.java:1400) at javax.imageio.ImageIO.read(ImageIO.java:1322) at com.atlassian.core.util.thumbnail.Thumber.getImage(Thumber.java:281) at com.atlassian.core.util.thumbnail.Thumber.createThumbnail(Thumber.java:241) at com.atlassian.core.util.thumbnail.Thumber.retrieveOrCreateThumbNail(Thumber.java:215) at com.atlassian.core.util.thumbnail.Thumber.retrieveOrCreateThumbNail(Thumber.java:86) at com.atlassian.jira.issue.thumbnail.DefaultThumbnailManager.getThumbnail(DefaultThumbnailManager.java:104) at com.atlassian.jira.issue.thumbnail.DefaultThumbnailManager.getThumbnails(DefaultThumbnailManager.java:50) {noformat} {noformat} 2009-10-28 10:51:57,874 http-8080-Processor21 ERROR [webwork.util.ValueStack] METHOD: "attachment", exception: com.atlassian.jira.exception.AttachmentNotFoundException: null at com.atlassian.jira.issue.managers.DefaultAttachmentManager.getAttachment(DefaultAttachmentManager.java:85) {noformat} {noformat} 2009-10-28 10:51:57,882 http-8080-Processor21 ERROR [webwork.util.ValueStack] METHOD: "latestFile", exception: java.lang.NullPointerException at com.atlassian.jira.web.bean.LatestFileBean.isLatestFile(LatestFileBean.java:44) {noformat} (I attached a full log file for posterity) I tested this against JIRA 3.13.5 and the issue does not occur - this is new in 4.0. Using this method of doing screen grabs works if you save to JPEG instead of GIF.

    Atlassian JIRA | 7 years ago | Michael Tokar
    com.atlassian.jira.exception.AttachmentNotFoundException: null

    Root Cause Analysis

    1. com.atlassian.jira.exception.AttachmentNotFoundException

      No message provided

      at com.atlassian.jira.issue.managers.DefaultAttachmentManager.getAttachment()
    2. com.atlassian.jira
      DefaultAttachmentManager.getAttachment
      1. com.atlassian.jira.issue.managers.DefaultAttachmentManager.getAttachment(DefaultAttachmentManager.java:75)
      1 frame
    3. com.atlassian.streams
      StreamsActivityServlet$1.doInTransaction
      1. com.atlassian.streams.jira.JiraSyndEntryFactoryImpl.extractAttachments(JiraSyndEntryFactoryImpl.java:309)
      2. com.atlassian.streams.jira.JiraSyndEntryFactoryImpl.buildAttachments(JiraSyndEntryFactoryImpl.java:250)
      3. com.atlassian.streams.jira.JiraSyndEntryFactoryImpl.buildChanged(JiraSyndEntryFactoryImpl.java:174)
      4. com.atlassian.streams.jira.JiraSyndEntryFactoryImpl.getSyndEntries(JiraSyndEntryFactoryImpl.java:96)
      5. com.atlassian.streams.jira.JiraStreamsActivityProvider.getActivityFeed(JiraStreamsActivityProvider.java:111)
      6. com.atlassian.streams.servlet.StreamsActivityServlet$1.doInTransaction(StreamsActivityServlet.java:123)
      6 frames
    4. com.atlassian.sal
      NoOpTransactionTemplate.execute
      1. com.atlassian.sal.core.transaction.NoOpTransactionTemplate.execute(NoOpTransactionTemplate.java:14)
      1 frame
    5. com.atlassian.streams
      StreamsActivityServlet.doGet
      1. com.atlassian.streams.servlet.StreamsActivityServlet.doGet(StreamsActivityServlet.java:115)
      1 frame
    6. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
      2. javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      2 frames
    7. com.atlassian.plugin
      DelegatingPluginServlet.service
      1. com.atlassian.plugin.descriptors.servlet.DelegatingPluginServlet.service(DelegatingPluginServlet.java:48)
      1 frame
    8. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      1 frame