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

Comments

Projects
None yet
2 participants
@hank-cp
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

This comment has been minimized.

Contributor

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

This comment has been minimized.

Member

bartoszwalacik commented Jun 24, 2016

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

This comment has been minimized.

Member

bartoszwalacik commented Jun 24, 2016

@bartoszwalacik bartoszwalacik added the bug label Jun 24, 2016

@bartoszwalacik

This comment has been minimized.

Member

bartoszwalacik commented Jun 24, 2016

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

This comment has been minimized.

Contributor

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

This comment has been minimized.

Member

bartoszwalacik commented Jul 6, 2016

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

This comment has been minimized.

Member

bartoszwalacik commented Jul 30, 2016

fixed in JaVers 2.1.1

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