Could not initialize class com.twelvemonkeys.imageio.color.ColorSpaces
See original GitHub issueEver since upgrading to 3.4, I keep getting sporadic exceptions during the initialization of our software. This is the stacktrace:
Could not initialize class com.twelvemonkeys.imageio.color.ColorSpaces
java.lang.ExceptionInInitializerError
at com.twelvemonkeys.imageio.color.YCbCrConverter.buildYCCtoRGBtable(YCbCrConverter.java:57)
at com.twelvemonkeys.imageio.color.YCbCrConverter.<clinit>(YCbCrConverter.java:77)
at com.twelvemonkeys.imageio.plugins.jpeg.JPEGImageReader.convertYCbCr2RGB(JPEGImageReader.java:1276)
at com.twelvemonkeys.imageio.plugins.jpeg.JPEGImageReader.readImageAsRasterAndReplaceColorProfile(JPEGImageReader.java:502)
at com.twelvemonkeys.imageio.plugins.jpeg.JPEGImageReader.read(JPEGImageReader.java:388)
at java.desktop/javax.imageio.ImageIO.read(ImageIO.java:1468)
...
Caused by: java.lang.NullPointerException
at java.desktop/sun.java2d.cmm.lcms.LCMS.getProfileSize(LCMS.java:67)
at java.desktop/java.awt.color.ICC_Profile.getData(ICC_Profile.java:1332)
at com.twelvemonkeys.imageio.color.ColorSpaces.<clinit>(ColorSpaces.java:105)
... 18 more
This doesn’t happen every time, it’s pretty sporadic. Any ideas? I’m on Linux if that matters. Please tell me if you need any more information.
Issue Analytics
- State:
- Created 5 years ago
- Comments:23 (10 by maintainers)
Top Results From Across the Web
TwelveMonkeys Plugin with fix not working? - Stack Overflow
I encountered the Unsupported Image Type error due to an incompatible colour profile using com.sun.imageio.plugins ...
Read more >com.twelvemonkeys.imageio.color.ColorSpaces java code ...
A helper class for working with ICC color profiles and color spaces. Standard ICC color profiles are read from system-specific locations for known...
Read more >TwelveMonkeys v3.5 release notes (2020-01-24) | LibHunt
The TwelveMonkeys ImageIO version 3.5 is ready for release. ... #437 Fix for Could not initialize class com.twelvemonkeys.imageio.color.ColorSpaces .
Read more >mattcg / TwelveMonkeys Download - JitPack
This will load the first image of the file, entirely into memory. The basic and simplest form of writing is: if (!ImageIO.write(image, format,...
Read more >Could not initialize class javax.imageio.Im - Oracle Communities
I tried to open a png file using ImageIO.read(). but i got the following Error: java.lang.NoClassDefFoundError: Could not initialize class ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I suggest trying JDK17 where this problem should be fixed and report any new issues you may found.
@boris-petrov Different language, I guess. In Java, you would write
.getData();
..k