New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mimepull 1.10.0 dependency breaks compatibility with Java 8 for Spring Boot 2.7.0 #31133
Comments
This comment was marked as outdated.
This comment was marked as outdated.
We have a similar situation with Jetty where we pin to v9 because v10+ requires Java 11. Ideally I think we should be consistent and do the same with mimepull, but unfortunately we've already cut the release. I'm now not sure if we should downgrade or not. Flagging for team attention to see what others think. |
@symphony-youri in the meantime you can try setting the |
We don't have any dependencies on mimepull which explains why the upgrade didn't break our Java 8 CI. I wonder if we can just remove dependency management for it. We added the dependency management to fix a bug in the pom of saaj-impl 1.5.0: #14924. |
In Boot 2.7 we depend on saaj-impl 1.5.3 where mimepull's an optional dependency so the problem fixed in #14924 no longer exists. I think we should remove dependency management for mimepull entirely in 2.7.1. |
@symphony-youri Can you share details of your application's dependencies? I'd like to understand how mimepull ended up on the classpath so that I can double-check my analysis above. |
Mimepull dependency was introduced in 1c18fd8 for spring-projectsgh-14924 to force the version as the one coming from saaj-impl was not on Maven Central. This is no longer the case. Version 1.10.0 of Mimepull has been built with Java 11, breaking compatibility with Java 8 for Spring Boot. Closes spring-projectsgh-31133
Sure @wilkinsona, here is an extract of the
Our application is using Jersey and one of its dependency is mimepull. We use Spring Boot dependencies with:
so I guess because it is part of Spring Boot's BOM it comes with this version and overrides the one from Jersey (https://mvnrepository.com/artifact/org.glassfish.jersey.media/jersey-media-multipart/2.35). Of course as noted by other comments, the version can be downgraded. But your proposal to drop the mimepull version sounds right to avoid surprises. I've opened #31145 for that. However in term of compatibility, is it ok just to drop it like that? Existing projects might be relying on this version being declared in Spring Boot. |
Thank you.
Ideally, we would have spotted this and made the change during the 2.7 milestones. Now that chance has gone, we need to try and strike a balance. Technically it is a breaking change, but it's one that is very easy for someone to overcome if they happen to have an unversioned direct dependency on mimepull. With that in mind, I think it's early enough in 2.7's life that we can remove the dependency management. IMO, its removal will inconvenience fewer people than if it we leave it in place. |
Closing in favor of #31145. |
In Spring Boot 2.7.0, mimepull has been upgraded to 1.10.0 (#30725).
It seems this version has been built with Java 11 (eclipse-ee4j/metro-mimepull#61), making Spring Boot 2.7.0 incompatible with Java 8 if the library is loaded (unless you override the version of course).
For instance, here is the error during the startup of a Spring Boot application using Jersey:
The text was updated successfully, but these errors were encountered: