Questions tagged [play-reactivemongo]

Play-ReactiveMongo is a plugin for Play 2.x, enabling support for ReactiveMongo – reactive, asynchronous and non-blocking Scala driver for MongoDB.

148 questions
11
votes
6 answers

MongoError No primary node is available

We have upgraded to Play 2.7.0 recently and use play2-reactivemongo version 0.16.2 with reactivemongo 0.16.3. We use reactivemongo-shaded-native but also tried without. We are connecting to a replica set with 3 nodes, MongoDB 3.6.10 on MongoDB…
cbley
  • 4,538
  • 1
  • 17
  • 32
6
votes
1 answer

Strange MongoError (with ReactiveMongo) when Play reloads application

Very often, when Play reloads the application after a code change, I receive the following error: MongoError['The node set can not be reached! Please check your network connectivity.'] The MongoDB log looks like…
6
votes
2 answers

Map MongoDB _id using Play-Reactivemongo plugin?

I'm trying to use the Play-ReactiveMongo plugin to read/write simple records in MongoDB with Play and Angular. The plugin seems like a nice option as it allows you to use simple case classes and regular JSON instead of explicitly converting between…
Chris Webster
  • 918
  • 8
  • 20
5
votes
1 answer

Error using reactivemongo 0.12.1 with play 2.5.X

I tried upgrading to reactive mongo 0.12.1 with play 2.5.12 but when I run the JVM quits on me and I get the following stack trace: Uncaught error from thread [application-akka.actor.default-dispatcher-2] shutting down JVM since…
YaDa
  • 1,253
  • 1
  • 13
  • 15
4
votes
0 answers

Play Framework unable to deserialize JSON read from Mongo

Our application uses Play, ReactiveMongo Scala driver and Mongo DB. We have the following versions of these components: com.typesafe.play %% play-json % 2.5.18 com.typesafe.play %% play % 2.5.18 com.typesafe.play %% play-ws %…
polestar
  • 41
  • 2
4
votes
1 answer

Warnings following upgrade of play2-reactivemongo from version 0.18.4 to 0.19.5

We are developing an application based on Play Framework (Scala) and storing data into a Mongo database using ReactiveMongo. After upgrading play2-reactivemongo from version 0.18.4 to 0.19.5, we obtain a lot of deprecation warnings and I can…
4
votes
1 answer

How to store date in MongoDB in ISO format instead of Long [Play, Scala and ReactiveMongo]?

I'm trying to insert date in MongoDB using following way: collection.insert(Json.obj("user"->"abc", "joined_date" -> DateTime.now)) In database: { "_id" :…
Ra Ka
  • 2,995
  • 3
  • 23
  • 31
4
votes
2 answers

How to get the document object id after insert in reactivemongo?

I have seen that this question seems to have been asked earlier (almost 3 years ago), but since then there might be lot of changes in the reactive mongo library. I am using the play plugin with version 2.4, but the…
Gaurav Abbi
  • 645
  • 9
  • 23
3
votes
0 answers

ReactiveMongo Pagination with Count

I am trying to implement Pagination with Reactive Mongo. def get(page: Int, pageSize: Int, filter: JsObject = Json.obj()): Future[Seq[Thing]] = { val actualPage = if(page > 1) page else 1 collection .find(filter) …
Eduardo
  • 6,900
  • 17
  • 77
  • 121
3
votes
0 answers

Scala ReactiveMongo: Channel not found on minor internet outage

Reactive Mongo stops on minor internet outage and doesn't restore, neither play stops, just subsequent queries get these repeated exception saying connection 10/1 but channel not found. This is mentioned as GitHub issue as well, but no solution is…
Ravinder Payal
  • 2,884
  • 31
  • 40
3
votes
0 answers

Inherited parse method conflict in scala

I'm working through some compilation errors (in Scala / Play Framework) and one I can't resolve is a conflict error. This is the error: class Games inherits conflicting members: [error] method parse in trait BaseControllerHelpers of type =>…
3
votes
1 answer

Bulk insert / Insert many with Play Framework, ReactiveMongo

I am building an app using Play Framework 2.5.0 and ReactiveMongo and I am spending a lot of time, stuck, on something that would be very easy to do in most web languages. That thing is inserting many documents at once. To do so, I must use the…
Daniel
  • 1,172
  • 14
  • 31
3
votes
0 answers

Query mongo ISODate using play reactive mongo

I am trying to query dates in mongodb. The dates are stored as ISODate("2015-10-08T05:48:55.778+0000"). Now how should i do query like $gte or $lte. I have been using Play plugin for reactive mongo To query from the mongo shell, I would need to…
mane
  • 1,149
  • 16
  • 41
3
votes
2 answers

Cannot access authenticated MongoDB collection from ReactiveMongo Play app

I have a MongoDB server where I have enabled authentication and created users with DB-specific permissions. The user for this app is defined as shown below i.e. geoAdmin has read, readWrite and dbOwner permissions for the relevant database: MongoDB…
Chris Webster
  • 918
  • 8
  • 20
3
votes
1 answer

Play + Scala + Reactivemongo + Rest Query with 2 params

I downloaded the typesafe application "modern-web-template", which implements a crud application with play + scala + reactivemongo I was trying to add a new functionality. I want to be able by calling a URL with two params like…
agusgambina
  • 6,229
  • 14
  • 54
  • 94
1
2 3
9 10