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
Conflicting dependencies in spring-boot-dependencies 3.1.0 #40371
Comments
Could you share a concrete exception stacktrace, or error happening at runtime with this arrangement? Spring Framework compiles against one version but is forward compatible with multiple Hiberate versions. The Spring Boot CI contains multiple tests against this, so a concrete sample application would help here. |
'JPA support for Hibernate ORM 6.1 (retaining compatibility with Hibernate ORM 5.6).' But spring-boot-dependencies offer
I'll try to provide a sample application. |
|
As promised . A stacktrace
A sample application is located here https://github.com/rixterd2/spring-sample-application Issue can be reproduced by simple building maven project or running a test https://github.com/rixterd2/spring-sample-application/blob/main/src/test/java/HibernateTest.java |
Thanks for the sample, closing as a duplicate of spring-projects/spring-framework#31515 (comment) |
You're definitely right about the error I've showcased. However that's not what I tried to show. To my mind the issue is bigger. We have spring framework 6 compiled against hibernate 5.6.x https://github.com/spring-projects/spring-framework/blob/6.0.x/framework-platform/framework-platform.gradle#L125 After that we offer Hibernate 6.2.24 in spring-boot-dependencies
Results could be unpredicatable for those who's based on these dependencies. Am I right ? |
No, I'm afraid not. As Brian already explained above, while Spring Framework compiles against Hibernate 5.6.x, it's also forwards compatible with multiple more recent Hibernate versions. That includes support for 6.2.x that was added in spring-projects/spring-framework#29736. |
Hello,
My team noticed that in spring-boot-dependencies you're using Hibernate 6.2.2+
spring-boot/spring-boot-project/spring-boot-dependencies/build.gradle
Line 368 in bf97f6c
However in spring-orm you're still using old 5.6.x version of hibernate.
https://github.com/spring-projects/spring-framework/blob/6.0.x/framework-platform/framework-platform.gradle#L125
This creates runtime errors due to Hibernate changed signature of Configuration class to https://github.com/hibernate/hibernate-orm/blob/6.2/hibernate-core/src/main/java/org/hibernate/cfg/Configuration.java#L1020 from https://github.com/hibernate/hibernate-orm/blob/6.1/hibernate-core/src/main/java/org/hibernate/cfg/Configuration.java#L816
This is just one example, I believe there could be more.
The text was updated successfully, but these errors were encountered: