java.lang.ClassCastException: \[I cannot be cast to \[B

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via freecol by *anonymous
, 1 year ago
\[I cannot be cast to \[B
via Stack Overflow by koldewb
, 2 years ago
[I cannot be cast to [B
via Oracle Community by 843799, 1 year ago
java.lang.ClassCastException: \[I cannot be cast to \[B
at java.awt.image.ColorModel.getAlpha(ColorModel.java:815)
at java.awt.image.ColorModel.getRGB(ColorModel.java:860)
at sun.awt.image.ImageRepresentation.convertToRGB(ImageRepresentation.java:278)
at sun.awt.image.ImageRepresentation.setPixels(ImageRepresentation.java:538)
at java.awt.image.AreaAveragingScaleFilter.accumPixels(AreaAveragingScaleFilter.java:196)
at java.awt.image.AreaAveragingScaleFilter.setPixels(AreaAveragingScaleFilter.java:235)
at sun.awt.image.ImageDecoder.setPixels(ImageDecoder.java:108)
at sun.awt.image.PNGImageDecoder.sendPixels(PNGImageDecoder.java:540)
at sun.awt.image.PNGImageDecoder.produceImage(PNGImageDecoder.java:460)
at sun.awt.image.InputStreamImageSource.doFetch(InputStreamImageSource.java:246)
at sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:172)
at sun.awt.image.ImageFetcher.run(ImageFetcher.java:136)

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.