Skip to content

BufferedImageHttpMessageConverter fails if JAI is installed [SPR-11581] #16205

@spring-projects-issues

Description

@spring-projects-issues

Bryan Turner opened SPR-11581 and commented

When Oracle JAI is installed, ImageIO.getReaderMIMETypes() and ImageIO.getWriterMIMETypes() both return a leading empty string in their arrays. This causes BufferedImageHttpMessageConverter'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

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)status: backportedAn issue that has been backported to maintenance branchestype: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions