Skip to content

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

Description

@hank-cp

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.

Activity

  1. hank-cp commented on Jun 24, 2016

    @hank-cp
    ContributorAuthor

    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.

  2. bartoszwalacik commented on Jun 24, 2016

    @bartoszwalacik
    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 ...

  3. bartoszwalacik commented on Jun 24, 2016

    @bartoszwalacik
    Member
  4. bartoszwalacik commented on Jun 24, 2016

    @bartoszwalacik
    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.

  5. hank-cp commented on Jun 30, 2016

    @hank-cp
    ContributorAuthor

    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.

  6. bartoszwalacik commented on Jul 6, 2016

    @bartoszwalacik
    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!

  7. bartoszwalacik commented on Jul 30, 2016

    @bartoszwalacik
    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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions