0 Replies Latest reply on Nov 29, 2012 6:31 PM by 347627

    Problem with SPI ordering using Java 7


      We are having problems with migrating out JAI application to use Java 7. We are using 'jai-1_1_3-lib-linux-amd64.tar.gz' with java 1.7.0_03-b04 64-Bit on Linux.

      The issue we are seeing is that the JAI service providers are not being correctly prioritized ahead of the JRE providers. For example in Java 1.6 a call to:

      Iterator<ImageReader> readersIterator = ImageIO.getImageReadersByMIMEType("image/jpeg")

      Would result in the first result always being 'CLibJPEGImageReader' in 1.6, but in java 1.7 some times the first provider is 'JPEGImageReader'. I think I have root caused the problem to be that the 'com.sun.imageio.plugins.jpeg.JPEGImageReaderSpi' reports 'getVendorName()' as 'Oracle Corporation' where as 1.6 reports 'Sun Microsystems'. I believe the problem is in the getJDKImageReaderWriterSPI() of ImageUtil line 1364:


      I am having a hard time finding if there is an update or workaround to this problem. Any help would be much appreciated.