com.atlassian.jira.exception.AttachmentNotFoundException: null

Atlassian JIRA | Michael Tokar | 7 years ago
  1. 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
  2. 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
  3. 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
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 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
  6. 0

    If multiple users are editing an issue concurrently, it is possible that one of them may attempt to delete an attachment that another has already deleted. If you do so, a System Error is displayed - this would be better as a friendly error message. Repro steps: 1) Open two browser windows and log into JIRA in both. 2) Go to the Manage Attachments page for the same issue in both. 3) Delete an attachment in the first window. 4) Delete the attachment in the second window. Stack trace: {noformat} com.atlassian.jira.exception.AttachmentNotFoundException: 10100 at com.atlassian.jira.issue.managers.DefaultAttachmentManager.getAttachment(DefaultAttachmentManager.java:85) at com.atlassian.jira.bc.issue.attachment.DefaultAttachmentService.getAndVerifyAttachment(DefaultAttachmentService.java:271) at com.atlassian.jira.bc.issue.attachment.DefaultAttachmentService.canDeleteAttachment(DefaultAttachmentService.java:60) at com.atlassian.jira.web.action.issue.DeleteAttachment.doValidation(DeleteAttachment.java:21) at webwork.action.ActionSupport.validate(ActionSupport.java:391) at webwork.action.ActionSupport.execute(ActionSupport.java:162) at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:53) at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:139) at com.atlassian.jira.web.dispatcher.JiraServletDispatcher.service(JiraServletDispatcher.java:177) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.core.filters.HeaderSanitisingFilter.doFilter(HeaderSanitisingFilter.java:44) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:55) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:41) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.jira.web.filters.accesslog.AccessLogFilter.executeRequest(AccessLogFilter.java:99) at com.atlassian.jira.web.filters.accesslog.AccessLogFilter.doFilter(AccessLogFilter.java:83) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.jira.security.xsrf.XsrfTokenAdditionRequestFilter.doFilter(XsrfTokenAdditionRequestFilter.java:50) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:119) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:55) at com.atlassian.jira.web.filters.SitemeshExcludePathFilter.doFilter(SitemeshExcludePathFilter.java:40) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:55) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:41) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.seraph.filter.SecurityFilter.doFilter(SecurityFilter.java:219) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.security.auth.trustedapps.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:98) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.seraph.filter.BaseLoginFilter.doFilter(BaseLoginFilter.java:139) at com.atlassian.jira.web.filters.JiraLoginFilter.doFilter(JiraLoginFilter.java:70) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:66) at com.atlassian.oauth.serviceprovider.internal.servlet.OAuthFilter.doFilter(OAuthFilter.java:69) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:74) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:42) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:55) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:41) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.util.profiling.filters.ProfilingFilter.doFilter(ProfilingFilter.java:99) at com.atlassian.jira.web.filters.JIRAProfilingFilter.doFilter(JIRAProfilingFilter.java:16) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.jira.web.filters.ActionCleanupDelayFilter.doFilter(ActionCleanupDelayFilter.java:59) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.jira.web.filters.RequestCleanupFilter.doFilter(RequestCleanupFilter.java:53) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.johnson.filters.AbstractJohnsonFilter.doFilter(AbstractJohnsonFilter.java:72) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:350) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.gzipfilter.GzipFilter.doFilterInternal(GzipFilter.java:81) at com.atlassian.gzipfilter.GzipFilter.doFilter(GzipFilter.java:51) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:55) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:41) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.core.filters.cache.AbstractCachingFilter.doFilter(AbstractCachingFilter.java:33) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.core.filters.encoding.AbstractEncodingFilter.doFilter(AbstractEncodingFilter.java:41) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.jira.startup.JiraStartupChecklistFilter.doFilter(JiraStartupChecklistFilter.java:86) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:567) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454) at java.lang.Thread.run(Thread.java:619) Referer URL: http://penny:8080/secure/DeleteAttachment!default.jspa?atl_token=c3-DBp8vKF&id=10000&deleteAttachmentId=10100 {noformat}

    Atlassian JIRA | 7 years ago | Penny Wyatt [on leave until 31st May]
    com.atlassian.jira.exception.AttachmentNotFoundException: 10100

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. com.atlassian.jira.exception.AttachmentNotFoundException

      null

      at com.atlassian.jira.issue.managers.DefaultAttachmentManager.getAttachment()
    2. com.atlassian.jira
      DefaultAttachmentManager.getAttachment
      1. com.atlassian.jira.issue.managers.DefaultAttachmentManager.getAttachment(DefaultAttachmentManager.java:85)
      1 frame