3
By calling ImageIO.read from the attached image, error occurs Invalid icc profile: Duplicate Sequence Numbers. Very simple code just doing:
File file = new File("C:\\temp\\imagem_java_teste.jpg");
FileInputStream input;
try {
    input = new FileInputStream(file);
    try {
        ImageIO.read(input);
    } catch (Throwable e) {
       e.printStackTrace();
    } finally {
        try {
            input.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
} catch (FileNotFoundException e1) {
    e1.printStackTrace();
}

Call stack:
javax.imageio.IIOException: Invalid icc profile: duplicate sequence numbers
    at com.sun.imageio.plugins.jpeg.JPEGImageReader.readImageHeader(Native Method)
    at com.sun.imageio.plugins.jpeg.JPEGImageReader.readNativeHeader(JPEGImageReader.java:532)
    at com.sun.imageio.plugins.jpeg.JPEGImageReader.checkTablesOnly(JPEGImageReader.java:277)
    at com.sun.imageio.plugins.jpeg.JPEGImageReader.gotoImage(JPEGImageReader.java:409)
    at com.sun.imageio.plugins.jpeg.JPEGImageReader.readHeader(JPEGImageReader.java:525)
    at com.sun.imageio.plugins.jpeg.JPEGImageReader.readInternal(JPEGImageReader.java:968)
    at com.sun.imageio.plugins.jpeg.JPEGImageReader.read(JPEGImageReader.java:948)
    at javax.imageio.ImageIO.read(ImageIO.java:1422)
    at javax.imageio.ImageIO.read(ImageIO.java:1326)
    at Teste.main(Teste.java:22)
I took your code and adapted to download the figure that is attached to your question instead of opening a file. And gave the same error.
– Victor Stafusa
that JDK is using?
– Fabio Cardoso
It’s worth taking a look here: https://searchcode.com/codesearch/view/17992571/ - Line 1285. On line 1280 is the bug that Fabio Cardoso refers to.
– Victor Stafusa
I read elsewhere that uninstalling JDK and reinstalling solves the problem.
– Fabio Cardoso
It was with jdk1.7.0_51, updated to jdk1.7.0_80 and continues with the error. jre running on the client also causes the error.
– Elizandro