UnsatisfiedLinkError JPEGImageWriter.initWriterIDs (libjpeg link issue?)

Bug #1421501 reported by Stian Soiland-Reyes on 2015-02-13
This bug affects 3 people
Affects Status Importance Assigned to Milestone
openjdk-8 (Ubuntu)

Bug Description

Tested on Debian unstable (docker run -it debian:unstable bash)

root@8643ea75afc5:/tmp# apt-get update && apt-get install -y openjdk-7-jdk

root@8643ea75afc5:/tmp# /usr/lib//jvm/java-8-openjdk-amd64/bin/javac JpegLinkErrorTest.java

root@8643ea75afc5:/tmp# /usr/lib//jvm/java-8-openjdk-amd64/bin/java JpegLinkErrorTest
Writing image of format JPG
Exception in thread "main" java.lang.UnsatisfiedLinkError: com.sun.imageio.plugins.jpeg.JPEGImageWriter.initWriterIDs(Ljava/lang/Class;Ljava/lang/Class;)V
 at com.sun.imageio.plugins.jpeg.JPEGImageWriter.initWriterIDs(Native Method)
 at com.sun.imageio.plugins.jpeg.JPEGImageWriter.<clinit>(JPEGImageWriter.java:186)
 at com.sun.imageio.plugins.jpeg.JPEGImageWriterSpi.createWriterInstance(JPEGImageWriterSpi.java:96)
 at javax.imageio.spi.ImageWriterSpi.createWriterInstance(ImageWriterSpi.java:351)
 at javax.imageio.ImageIO$ImageWriterIterator.next(ImageIO.java:843)
 at javax.imageio.ImageIO$ImageWriterIterator.next(ImageIO.java:827)
 at javax.imageio.ImageIO.getWriter(ImageIO.java:1596)
 at javax.imageio.ImageIO.write(ImageIO.java:1520)
 at JpegLinkErrorTest.main(JpegLinkErrorTest.java:21)

It only fails on the 'jpg' file types (jpg/jpeg/JPG/JPEG) - but 'jpg' is first in the list.

Works on Oracle JDK 8u31 and with openjdk-7-jdk:

Writing image of format BMP
Writing image of format bmp
Writing image of format jpg
Writing image of format JPG
Writing image of format wbmp
Writing image of format jpeg
Writing image of format png
Writing image of format JPEG
Writing image of format PNG
Writing image of format WBMP
Writing image of format GIF
Writing image of format gif

Looking for initWriterIDs in Oracle JDK8 gives a hit in its bundled libjpeg.so:

stain@biggie-utopic:~/software/jdk1.8.0_31$ grep -r initWriterIDs .
Binary file ./jre/lib/amd64/libjpeg.so matches
Binary file ./jre/lib/rt.jar matches
Binary file ./lib/ct.sym matches

but libjpeg.so is not in /usr/lib//jvm/java-8-openjdk-amd64

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in openjdk-8 (Ubuntu):
status: New → Confirmed
Luiz Felipe Talvik (talvik) wrote :

I think this is the best description and solution for this bug:

Matthias Klose (doko) wrote :

fixed for 15.04

Changed in openjdk-8 (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.