Upgrade spring data mongo db version - spring

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.

Related

Session vs CqlSession in CassandraTemplate compatibility in Cassandra Java driver

I'm trying to migrate a SpringBoot project from spring-data-cassandra 2.1.x to 3.2.x and I encountered an issue:
In 2.1.x version CassandraTemplate is created as follows new CassandraTemplate(getCassandraSession()), where getCassandraSession() returns com.datastax.driver.core.Session.
But in 3.2.x version CassandraTemplate doesn't have such a constructor. It only supports com.datastax.oss.driver.api.core.CqlSession. Is there a way to retrieve CqlSession from Session or to make it backward compatible?
Datastax version is 3.6.0.
Thank you!
Datastax upgraded its driver in January 2019 from 3.x to 4.x with no backward compatibility. Spring Data 3.x moved the latest version of the drivers a while ago indeed.
Solution is to upgrade your code to an updated version or stay stuck with Spring Data Cassandra 2.x (and Spring Boot 1.x).
To migrate your code from 3x to 4x please follow the upgrade guide and some code to help you.

Which version of Spring Data Release Train supports Hibernate 5.2?

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.

What's the last version of Spring Data MongoDB compatible with Spring 3.2?

I need to use WiredTiger Engine in my application which is available in the latest mongodb version 3.2.2 and my Maven repository which is using the version Spring Data MongoDB version 1.8.4, Java driver version 2.13.3 and I've installed MongoDB version 2.6.11.
Which version of spring-data-mongodb should i use, in order to be compatible with Spring 3.2.2.RELEASE?
This is the duplicate of the following unanswered question :
Which version of Spring Data MongoDB is compatible with Spring 3.2.2.RELEASE?
But I don't have enough privilege to re-ask or comment on the Question.
The last Spring Data release train compatible with Spring 3.2 is Dijkstra and has seen its last service release January 27th, 2015. The Spring Data MongoDB version contained in it is 1.5.5.RELEASE.
Note that this version is not compatible with any MongoDB 3.x version. MongoDB 3.x support was introduced in the Fowler release train and is refined in even more current releases only. So I am strongly suggesting to upgrade to one of those versions if you want to work with a MongoDB of that generation.

How long will Spring 3.x continue to be supported?

I've recently inherited a project that's built on some older technologies, including iBATIS 2.x, and Struts 1.x. Both of those seem to be supported (though #Deprecated) in Spring 3.2.x, and not at all in Spring 4.x:
org.springframework.orm.ibatis, Object Relational Mapping (ORM) Data Access - iBATIS SQL Maps
org.springframework.web.struts, Integrating with other web frameworks - Apache Struts 1.x and 2.x
However, before I start the effort of migrating to Spring 3, I want to know how much longer I can expect to see it supported by the upstream developers. Would I have enough time to keep running Spring 3 while I migrate other parts of my application to newer tools, and then finally migrate over to Spring 4? Or should I focus on upgrading all of these other things before I can get onto Spring?
I hardly understand your problem. iBATIS 2.x and Struts 1.x are both no longer supported. They can work fine, as does Spring 2.x, but if a security problem is discovered, it will not be fixed.
If you contemplate migrating to Spring 3.x, you should also contemplate the migration to MyBatis and Struts 2.x (or Spring MVC ?) unless you have special requirements.
BTW, Spring 3.0 and 3.1 series are no longer supported either, and support for 3.2 should end when 4.2 will reach General Availability status, as Spring Framework generally offers support for current version, and the 2 previous (legacy) ones.
Spring 3.X will be end-of-life as of Dec 31 2016, but there will only be maintenance releases until that time (no feature development will happen).
I just work on project that uses Spring 4 with MyBatis. There is project MyBatis-Spring that integrates these two. Works like charm.
Don't know how to help with second bullet, cause we are using Spring MVC.
Seems that they've just posted a blog post that includes clarification on this topic:
Furthermore, please note that the 3.2.x line - and therefore the
entire 3.x generation - is approaching its end of life in 2015. We are
still committed to basic maintenance for critical issues; however,
don’t expect more than two or three further 3.2.x releases down the
road.
Source: Spring Framework 4.1.4 & 4.0.9 & 3.2.13 released
So, it seems that I'd have at least a few months of 3.x being supported to work on transitioning everything.
For my current project I'm required to use Struts 1.2.4. But I also wanted to utilize Spring 4.1.x.
To compensate for the missing Struts support since Spring 4, I copied the code from the spring-struts 3.2.13 package and created a Spring 4.1.5 compatible spring-struts-forwardport package.
Obviously this is not the most elegant solution, but maybe this can help you solve your problem.
I guess this package will also work with the next Spring 4.1 releases.

Issue with Upgrade to Hibernate 3.5 in JBoss 4.2.3

We have been trying to implement a hibernate search with our project and in this case we had to implement Hibernate 3.5 previously we were using Hibernate Core 3.2.
Initially we tried to upgrade our version directly to the latest hibernate search and hibernate core. But, in Hibernate 4 they have removed the TransactionManagerLookupClass.
So, now what we can do in order to upgrade our Hibernate to Hibernate 3.5. As we can't upgrade our Application Server because we have other applications running on the same server.
Currently we are using:
hibernate-commons-annotations-4.0.1.Final.jar
hibernate-core-4.1.9.Final.jar
hibernate-jpa-2.0-api-1.0.1.Final.jar
hibernate-search-4.1.0.Final.jar
hibernate-search-analyzers-4.1.0.Final.jar
hibernate-search-engine-4.1.0.Final.jar
hibernate-search-orm-4.1.0.Final.jar
These are the files that we are using but, we know Hibernate 4 is not at all compatible with JBOSS 4.2.3. What we want to know that is there anyway to upgrade our hibernate core to a version where it's compatible with Hibernate search.
Secondly, the way be which we can keep the same application server.
You could use a very old version of Hibernate Search which is compatible with such a very old version of Hibernate ORM.
A better alternative would be to download a more recent version of the application server like WildFly 8 and start using that for the new applications: you can use the old JBoss 4.2 for the old applications and use a new container in parallel.
Remember that you can run multiple different application servers on the same server, you only have to make sure they use different ports.

Resources