java.lang.NullPointerException

Atlassian JIRA | Michael Tokar | 7 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  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
    java.lang.NullPointerException
  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
    java.lang.NullPointerException

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at com.atlassian.jira.web.bean.LatestFileBean.isLatestFile()
    2. com.atlassian.jira
      LatestFileBean.isLatestFile
      1. com.atlassian.jira.web.bean.LatestFileBean.isLatestFile(LatestFileBean.java:44)
      1 frame