'Could not initialize class sun.awt.image.IntegerInterleavedRaster' when Resizing an Image

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

Image resizing, as described in Displaying a Thumbnail Image does not work. The following appears in the atlassian-confluence.log:

java.lang.NoClassDefFoundError: Could not initialize class sun.awt.image.IntegerInterleavedRaster
	at java.awt.image.Raster.createPackedRaster(Raster.java:782)
	at java.awt.image.Raster.createPackedRaster(Raster.java:466)
	at java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:1015)
	at java.awt.image.BufferedImage.<init>(BufferedImage.java:312)
	at com.atlassian.core.util.thumbnail.SimpleImageConsumer.createImage(SimpleImageConsumer.java:180)
	at com.atlassian.core.util.thumbnail.SimpleImageConsumer.setColorModel(SimpleImageConsumer.java:42)

Cause

The missing class sun.awt.image.IntegerInterleavedRaster is included in <JDK installation folder>\jre\lib\rt.jar. If you do not have this jar file you may see the error above.

Resolution

Reinstall Java or make sure that your JAVA_HOME is pointing at the right directory.

(info) This also occurs when you don't specify -Djava.awt.headless=true when running on Linux flavoured OS.

Last modified on Nov 2, 2018

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.