I'm developing a simple web app with Spring, JPA, Hibernate, all latest versions.
I've imported hibernate-core in 5.2.4.Final as well as spring-data-jpa which version is set through the Hopper-SR5 version of spring-data-releasetrain. But the spring related dependencies are still 4.2.x !!!
And I'm facing the NoSuchMethodError: org.hibernate.Session.getFlushMode() problem related to the integration of Hibernate 5.2 into Spring which will be fixed in 4.3!
Integrate Hibernate 5.2 with Spring framework 4.x
https://jira.spring.io/browse/SPR-14334
Never noticed this page:
https://github.com/spring-projects/spring-data-commons/wiki/Release-Train-Hopper
=> Core: Upgrade Spring Framework baseline to 4.2
So basically I suppose I'm not using the correct release train version (but it's the GA!)
But next release train doesn't have anything related to Spring Framework:
https://github.com/spring-projects/spring-data-commons/wiki/Release-Train-Ingalls
and the "next next" has Spring Framework 5:
https://github.com/spring-projects/spring-data-commons/wiki/Release-Train-Kay
What am I supposed to do?
upgrade release train, to which version?
keep release train to current version, but downgrade Hibernate version?
remove release train and import each spring module one by one?
Thanks.
Related
Can i upgrade spring data mongo version to 2.2 without upgrading the spring framework version. Currently i am using spring framework version 3.2. I need to upgrade spring data mongo db version to support mongo db 4.2 TLS support.
No, you can't. The 2.x generation of Spring Data requires Spring 5 at least. Spring Framework 3.2 is severely out of date and not maintained anymore. Spring 4 was released over 6 years ago. I can only strongly recommend to upgrade to a currently maintained version to make sure you benefit from security fixes that the 3.x generation has already not seen anymore for years.
We are currently using the following frameworks and its versions.
Spring Boot parent - 1.4.5.RELEASE
Vaadin-Bom - 7.7.3
Vaadin Spring Boot Starter - 1.1.0
Vaadin-Spring - 1.1.0
Planning to upgrade the spring boot parent version. But i'm sure if we upgrade the spring boot parent version, then need to upgrade the Vaadin dependencies.
I spent few days to find the latest Vaadin frameworks compatibility with the
Spring Boot jars. But couldn't able to arrive at solution. Could you please share your suggestions.
Thanks in Advance!!!
Since Vaadin 7 end-of-life happened already I would suggest migrating to Vaadin 8. You can check the versions in Vaadin 8 full stack app starter with Spring
I have tried to figure out which version of spring-data-jdbc to use with Spring Boot 1.5.20.RELEASE (= Spring Framework 4.3.23.RELEASE) - but I can't find that info anywhere.
Is it because spring-data-jdbc only work with Spring Boot 2.x / Spring Framework 5.x?
Specifically I want to use #Query, #EnableJdbcRepositories, etc.
When I look at the release notes for Spring Data Ingalls SR20 (the release train that matches Boot 1.5.20.RELEASE / Framework 4.3.23.RELEASE) it looks like spring-data-jdbc is only supported in Lovelace (Boot 2.x and Framework 5.x): https://spring.io/blog/2019/04/10/spring-data-lovelace-sr6-kay-sr14-ingalls-sr20-released
EDIT & ANSWER: As per comment from #JensSchauder: spring-data-jdbc is a (fairly) new project created from scratch. There is no way to use it with Spring Framework 4.
If you look at the spring-data-jdbc pom.xml it uses spring-data-parent to manage Spring Framework version by defining and applying spring.version property. You must ensure that this Spring Framework version is compatible with whatever version you are using.
The first available spring-data-jdbc:1.0.0.RELEASE version uses spring-data-parent:2.1.0.RELEASE parent which requires Spring Framework 5.1:
<spring>5.1.0.RELEASE</spring>
It's not be recommended to use spring-data-jdbc with lower Spring Framework version. Since Spring Boot 1.5.X uses Spring Framework 4.X the answer would be no.
Please what is the compatible release version for Spring Security for Spring 3.2.8 release ?
There is little dependancy between Spring Security versions and Spring Framework versions. I have already used Spring Security 3.1.x with Spring Framework 3.1.x and 3.2.x.
If you have no reason to do differently (portability of code) you should choose the more recent General Available version that is compatible with your other components.
Doc for latest GA (4.0.1) says that it builds against Spring Framework 4.1.6.RELEASE, but should work with 4.0.x => no good.
Doc for previous GA (3.2.7) says that is builds against Spring Framework 3.2.13.RELEASE, but is also tested against Spring Framework 4.1.6.RELEASE
It would be my first choice, but if you use maven, you will have to control what is actually imported via transitive dependancy and eventually force 3.2.8 versions for all used Spring Framework components to avoid mixing different versions, or better upgrade to 3.2.13 since it is only a patch level different version.
Of course, you can also make use of the fact that previous Spring Security version (3.2.6) explicitely builds against Spring Framework 3.2.8.RELEASE, as said by #zeisi
According to the Docs it would be 3.2.6, see Spring Security Docs
Please what is the compatible release version for Spring Security for Spring 3.2.8 release ?
There is little dependancy between Spring Security versions and Spring Framework versions. I have already used Spring Security 3.1.x with Spring Framework 3.1.x and 3.2.x.
If you have no reason to do differently (portability of code) you should choose the more recent General Available version that is compatible with your other components.
Doc for latest GA (4.0.1) says that it builds against Spring Framework 4.1.6.RELEASE, but should work with 4.0.x => no good.
Doc for previous GA (3.2.7) says that is builds against Spring Framework 3.2.13.RELEASE, but is also tested against Spring Framework 4.1.6.RELEASE
It would be my first choice, but if you use maven, you will have to control what is actually imported via transitive dependancy and eventually force 3.2.8 versions for all used Spring Framework components to avoid mixing different versions, or better upgrade to 3.2.13 since it is only a patch level different version.
Of course, you can also make use of the fact that previous Spring Security version (3.2.6) explicitely builds against Spring Framework 3.2.8.RELEASE, as said by #zeisi
According to the Docs it would be 3.2.6, see Spring Security Docs