scalareactivemongoplay-reactivemongo

Updating reactivemongo due to PrimaryUnavailableException


While updating reactivemongo from "org.reactivemongo" %% "play2-reactivemongo" % "0.12.5-play26" to "org.reactivemongo" %% "play2-reactivemongo" % "0.20.13-play26" I am getting error (ref screenshot). I did a clean compile (sbt clean compile)

enter image description here

I dont know what this error mean. Here are the details of my project:

P.S: My reason of updating the reactivemongo version is I am getting lot of PrimaryUnavailableException and one of the answers here is to update reactivemongo version. Furthermore, I check my reactivemongo("org.reactivemongo" %% "play2-reactivemongo" % "0.12.5-play26") debug logs for the cause and found lot of error(ref below img) before the PrimaryUnavailableException

enter image description here

I ask you to please guide me on:

  1. how to fix errors in 1st image.
  2. If possible is updating reactivemongo the only solution to fix PrimaryUnavailableException.

Solution

  • Haven't used reactivemongo, but seems your problem comes from Play Iteratees moved to separate project.

    Play Iteratees has been moved to a separate library hosted at https://github.com/playframework/play-iteratees. Since Play Iteratees has no dependencies on the rest of Play, the main change is that the you’ll have to specify the library manually:

    libraryDependencies += "com.typesafe.play" %% "play-iteratees" % "2.6.1"
    

    I think adding that dependency should fix the compilation error


    Things that you should have in mind: