mongodbcasbahsalat

What version of Salat/Casbah should I use to connect to Mongo 3.x server?


I am using https://github.com/salat/salat. But it seems that salat is using Casbah 2.7. Our mongo server is 3.0.6. But we are not able to connect and always got this error.

Configuration error: Configuration error[Access denied to MongoDB database: [mg_prod] with user: [mydbuser]]
        at play.api.Configuration$.play$api$Configuration$$configError(Configuration.scala:94)
        at play.api.Configuration.reportError(Configuration.scala:743)
        at se.radley.plugin.salat.SalatPlugin$MongoSource.connection(SalatPlugin.scala:36)
        at se.radley.plugin.salat.SalatPlugin$$anonfun$onStart$1.apply(SalatPlugin.scala:136)
        at se.radley.plugin.salat.SalatPlugin$$anonfun$onStart$1.apply(SalatPlugin.scala:131)

Can you please give me some idea how should I fix this issue?


Solution

  • As a workaround you can add

    "org.mongodb" %% "casbah" % "2.8.2"
    

    to your build.sbt file and the error should be gone.