BufferedImageHttpMessageConverter fails if JAI is installed [SPR-11581] #16205
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
status: backported
An issue that has been backported to maintenance branches
type: bug
A general bug
Milestone
Bryan Turner opened SPR-11581 and commented
When Oracle JAI is installed,
ImageIO.getReaderMIMETypes()
andImageIO.getWriterMIMETypes()
both return a leading empty string in their arrays. This causesBufferedImageHttpMessageConverter
's constructor to fail.I doubt this is actually a Spring bug; it seems far more likely this is a JAI bug (That said, the documentation for the
ImageIO
methods doesn't really establish any expectations for the returned array, which is unfortunate). However, working around it in Spring may be beneficial.Affects: 3.2.8, 4.0.2
Reference URL: http://stackoverflow.com/questions/12667311/imageio-getreadermimetypes-returning-null-on-linux-running-tomcat-works-fine
Backported to: 3.2.9
The text was updated successfully, but these errors were encountered: