Skip to content
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

Incompatible mongodb driver version between Javers & spring-data-mongodb #395

Closed
hank-cp opened this issue Jun 24, 2016 · 7 comments
Closed

Comments

@hank-cp
Copy link
Contributor

hank-cp commented Jun 24, 2016

Javers dependencies list:

+--- org.javers:javers-persistence-mongo:2.0.2
|    \--- org.mongodb:mongo-java-driver:3.0.4

Spring-data-mongodb dependencies list:

+--- org.springframework.boot:spring-boot-starter-data-mongodb:1.2.5.RELEASE
|    +--- org.springframework.boot:spring-boot-starter:1.2.5.RELEASE (*)
|    +--- org.mongodb:mongo-java-driver:2.12.5 -> 3.0.4
|    +--- org.springframework:spring-core:4.1.7.RELEASE (*)
|    +--- org.springframework:spring-tx:4.1.7.RELEASE (*)
|    \--- org.springframework.data:spring-data-mongodb:1.6.3.RELEASE
|         +--- org.springframework:spring-tx:4.0.9.RELEASE -> 4.1.7.RELEASE (*)
|         +--- org.springframework:spring-context:4.0.9.RELEASE -> 4.1.7.RELEASE (*)
|         +--- org.springframework:spring-beans:4.0.9.RELEASE -> 4.1.7.RELEASE (*)
|         +--- org.springframework:spring-core:4.0.9.RELEASE -> 4.1.7.RELEASE (*)
|         +--- org.springframework:spring-expression:4.0.9.RELEASE -> 4.1.7.RELEASE (*)
|         +--- org.springframework.data:spring-data-commons:1.9.3.RELEASE (*)
|         +--- org.mongodb:mongo-java-driver:2.12.5 -> 3.0.4
|         +--- org.slf4j:slf4j-api:1.7.12
|         \--- org.slf4j:jcl-over-slf4j:1.7.12 (*)

As you can see, Javers depends higher version then spring-data-mongodb. These two versions are hugely different that I even couldn't choose one and ignore another one. In another word, if I choose to use 3.0.4, spring-data-mongodb will be broken.

Now I have to try to implement my own JaversMongoRepository, which is not good and risky.

It's better to have a backward compatible version of javers-persistence-mongo, which use mongo driver 2.x to live with spring-data-mongo.

@hank-cp
Copy link
Contributor Author

hank-cp commented Jun 24, 2016

I found old version of javers-persistence-mongo (1.2.0) depends working mongodb driver version for me, not sure if it works with modern Javers core.

@bartoszwalacik
Copy link
Member

You are right, looks like the spring-boot-starter-data-mongodb:1.3.0 dependes on the old version of mongo-java-driver for some reason. I will check if they fixed it in 1.3.5 ...

@bartoszwalacik
Copy link
Member

@bartoszwalacik
Copy link
Member

Spring Boot have bumped mongo-java-driver to 3.x in 1.4.0.M3.
We need to wait for Spring Boot 1.4.0 RELEASE.

@hank-cp
Copy link
Contributor Author

hank-cp commented Jun 30, 2016

I folked a repo and re-implement MongoRepository to use mongo driver 2.x.
https://github.com/hank-cp/javers
In case somebody need it.

@bartoszwalacik If you need this push to master repo, plz let me know.

@bartoszwalacik
Copy link
Member

https://spring.io/blog/2016/07/05/spring-boot-1-4-0-rc1-available-now
Our next stop is 1.4.0.RELEASE scheduled alongside Spring Framework 4.3.2.RELEASE at the end of the month. Stay tuned!

@bartoszwalacik
Copy link
Member

fixed in JaVers 2.1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants