javax.imageio.IIOException: Unsupported Image Type

Atlassian JIRA | Adam Stuckey [Atlassian] | 7 years ago
  1. 0

    Activity stream dies with: An internal server error occurred when requesting resource http://localhost:8080/plugins/servlet/streams?os_authType=basic&maxResults=100. See attached image for screen shot of this error. This appears to be caused by an issue that has CMYK JPEG's attached. Some exceptions seen in the logs: 2010-01-05 11:54:58,142 http-8080-Processor23 ERROR xxxxxx 42895x1184x1 z82x4w http://localhost:8080/plugins/servlet/streams [atlassian.streams.servlet.StreamsActivityServlet] Error getting activity java.lang.NullPointerException at com.atlassian.streams.jira.JiraSyndEntryFactoryImpl.getThumbnailedAttachments(JiraSyndEntryFactoryImpl.java:364) at com.atlassian.streams.jira.JiraSyndEntryFactoryImpl.buildAttachmentHtml(JiraSyndEntryFactoryImpl.java:310) at com.atlassian.streams.jira.JiraSyndEntryFactoryImpl.buildAttachments(JiraSyndEntryFactoryImpl.java:277) at com.atlassian.streams.jira.JiraSyndEntryFactoryImpl.buildChanged(JiraSyndEntryFactoryImpl.java:196) at com.atlassian.streams.jira.JiraSyndEntryFactoryImpl.getSyndEntries(JiraSyndEntryFactoryImpl.java:118) at com.atlassian.streams.jira.JiraStreamsActivityProvider.getActivityFeed(JiraStreamsActivityProvider.java:113) at com.atlassian.streams.servlet.StreamsActivityServlet$1.doInTransaction(StreamsActivityServlet.java:118) at com.atlassian.sal.core.transaction.HostContextTransactionTemplate$1.doInTransaction(HostContextTransactionTemplate.java:25) at com.atlassian.jira.DefaultHostContextAccessor.doInTransaction(DefaultHostContextAccessor.java:34) at sun.reflect.GeneratedMethodAccessor230.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.atlassian.plugin.osgi.hostcomponents.impl.DefaultComponentRegistrar$ContextClassLoaderSettingInvocationHandler.invoke(DefaultComponentRegistrar.java:129) at $Proxy229.doInTransaction(Unknown Source) and 2010-01-05 09:16:53,743 http-8080-Processor20 ERROR xxxxxxx 33411x645x1 z82x4w http://localhost:8080/plugins/servlet/streams [core.util.thumbnail.Thumber] Unable to create thumbnail image for id 11849 javax.imageio.IIOException: Unsupported Image Type at com.sun.imageio.plugins.jpeg.JPEGImageReader.readInternal(JPEGImageReader.java:922) at com.sun.imageio.plugins.jpeg.JPEGImageReader.read(JPEGImageReader.java:897) at javax.imageio.ImageIO.read(ImageIO.java:1422) at javax.imageio.ImageIO.read(ImageIO.java:1326) 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) at sun.reflect.GeneratedMethodAccessor233.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.atlassian.util.profiling.object.ObjectProfiler.profiledInvoke(ObjectProfiler.java:70) at com.atlassian.jira.config.component.SwitchingInvocationHandler.invoke(SwitchingInvocationHandler.java:28) at $Proxy92.getThumbnails(Unknown Source)

    Atlassian JIRA | 7 years ago | Adam Stuckey [Atlassian]
    javax.imageio.IIOException: Unsupported Image Type
  2. 0

    Activity stream dies with: An internal server error occurred when requesting resource http://localhost:8080/plugins/servlet/streams?os_authType=basic&maxResults=100. See attached image for screen shot of this error. This appears to be caused by an issue that has CMYK JPEG's attached. Some exceptions seen in the logs: 2010-01-05 11:54:58,142 http-8080-Processor23 ERROR xxxxxx 42895x1184x1 z82x4w http://localhost:8080/plugins/servlet/streams [atlassian.streams.servlet.StreamsActivityServlet] Error getting activity java.lang.NullPointerException at com.atlassian.streams.jira.JiraSyndEntryFactoryImpl.getThumbnailedAttachments(JiraSyndEntryFactoryImpl.java:364) at com.atlassian.streams.jira.JiraSyndEntryFactoryImpl.buildAttachmentHtml(JiraSyndEntryFactoryImpl.java:310) at com.atlassian.streams.jira.JiraSyndEntryFactoryImpl.buildAttachments(JiraSyndEntryFactoryImpl.java:277) at com.atlassian.streams.jira.JiraSyndEntryFactoryImpl.buildChanged(JiraSyndEntryFactoryImpl.java:196) at com.atlassian.streams.jira.JiraSyndEntryFactoryImpl.getSyndEntries(JiraSyndEntryFactoryImpl.java:118) at com.atlassian.streams.jira.JiraStreamsActivityProvider.getActivityFeed(JiraStreamsActivityProvider.java:113) at com.atlassian.streams.servlet.StreamsActivityServlet$1.doInTransaction(StreamsActivityServlet.java:118) at com.atlassian.sal.core.transaction.HostContextTransactionTemplate$1.doInTransaction(HostContextTransactionTemplate.java:25) at com.atlassian.jira.DefaultHostContextAccessor.doInTransaction(DefaultHostContextAccessor.java:34) at sun.reflect.GeneratedMethodAccessor230.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.atlassian.plugin.osgi.hostcomponents.impl.DefaultComponentRegistrar$ContextClassLoaderSettingInvocationHandler.invoke(DefaultComponentRegistrar.java:129) at $Proxy229.doInTransaction(Unknown Source) and 2010-01-05 09:16:53,743 http-8080-Processor20 ERROR xxxxxxx 33411x645x1 z82x4w http://localhost:8080/plugins/servlet/streams [core.util.thumbnail.Thumber] Unable to create thumbnail image for id 11849 javax.imageio.IIOException: Unsupported Image Type at com.sun.imageio.plugins.jpeg.JPEGImageReader.readInternal(JPEGImageReader.java:922) at com.sun.imageio.plugins.jpeg.JPEGImageReader.read(JPEGImageReader.java:897) at javax.imageio.ImageIO.read(ImageIO.java:1422) at javax.imageio.ImageIO.read(ImageIO.java:1326) 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) at sun.reflect.GeneratedMethodAccessor233.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.atlassian.util.profiling.object.ObjectProfiler.profiledInvoke(ObjectProfiler.java:70) at com.atlassian.jira.config.component.SwitchingInvocationHandler.invoke(SwitchingInvocationHandler.java:28) at $Proxy92.getThumbnails(Unknown Source)

    Atlassian JIRA | 7 years ago | Adam Stuckey [Atlassian]
    javax.imageio.IIOException: Unsupported Image Type
  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
    javax.imageio.IIOException: Unexpected block type 0!
  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
    javax.imageio.IIOException: Unexpected block type 0!

  1. serious2monkeys 3 times, last 2 months ago
  2. rexgreenza 10 times, last 3 months ago
  3. ptrstovka 2 times, last 8 months ago
15 unregistered visitors
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. javax.imageio.IIOException

    Unsupported Image Type

    at com.sun.imageio.plugins.jpeg.JPEGImageReader.readInternal()
  2. Java RT
    ImageIO.read
    1. com.sun.imageio.plugins.jpeg.JPEGImageReader.readInternal(JPEGImageReader.java:922)
    2. com.sun.imageio.plugins.jpeg.JPEGImageReader.read(JPEGImageReader.java:897)
    3. javax.imageio.ImageIO.read(ImageIO.java:1422)
    4. javax.imageio.ImageIO.read(ImageIO.java:1326)
    4 frames
  3. com.atlassian.core
    Thumber.retrieveOrCreateThumbNail
    1. com.atlassian.core.util.thumbnail.Thumber.getImage(Thumber.java:281)
    2. com.atlassian.core.util.thumbnail.Thumber.createThumbnail(Thumber.java:241)
    3. com.atlassian.core.util.thumbnail.Thumber.retrieveOrCreateThumbNail(Thumber.java:215)
    4. com.atlassian.core.util.thumbnail.Thumber.retrieveOrCreateThumbNail(Thumber.java:86)
    4 frames
  4. com.atlassian.jira
    DefaultThumbnailManager.getThumbnails
    1. com.atlassian.jira.issue.thumbnail.DefaultThumbnailManager.getThumbnail(DefaultThumbnailManager.java:104)
    2. com.atlassian.jira.issue.thumbnail.DefaultThumbnailManager.getThumbnails(DefaultThumbnailManager.java:50)
    2 frames
  5. Java RT
    Method.invoke
    1. sun.reflect.GeneratedMethodAccessor233.invoke(Unknown Source)
    2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    3. java.lang.reflect.Method.invoke(Method.java:597)
    3 frames
  6. com.atlassian.util
    ObjectProfiler.profiledInvoke
    1. com.atlassian.util.profiling.object.ObjectProfiler.profiledInvoke(ObjectProfiler.java:70)
    1 frame
  7. com.atlassian.jira
    SwitchingInvocationHandler.invoke
    1. com.atlassian.jira.config.component.SwitchingInvocationHandler.invoke(SwitchingInvocationHandler.java:28)
    1 frame
  8. Unknown
    $Proxy92.getThumbnails
    1. $Proxy92.getThumbnails(Unknown Source)
    1 frame