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
0
votes
1 answer

No Json serializer as JsObject found for type model.User. Try to implement an implicit OWrites or OFormat for this type

I'm using Play framework with Scala and Reactive Mongo to save an object into my mongodb database. Following this http://reactivemongo.org/releases/0.10/documentation/bson/usage.html I came up with the following code: import java.util.Date import…
redwulf
  • 1,317
  • 3
  • 13
  • 35
0
votes
2 answers

Play-ReactiveMongo Authentication Failed with MongoDB 3

I have problem using play-reactivemongo to connect to MongoDB 3 and encountered the "'not authorized for query on XXX' (code = 13)" problem. The program ran perfectly ok when MongoDB was started without --auth. The database version should be 3.0.4,…
Joseph Hui
  • 573
  • 6
  • 11
0
votes
0 answers

ReactiveMongo: Need to convert java.time.LocalDate to reactivemongo.bson.BSONDateTime

My requirement is to set BSONDateTime to specific data only. From java.util.Date i found exact data, but when trying to convert in BSONDateTime my output is wrong. Following is my code for convert: val currentDate: LocalDate = LocalDate.now(); val…
Harmeet Singh Taara
  • 6,483
  • 20
  • 73
  • 126
0
votes
1 answer

RuntimeException on validation of JsonReaders - Scala - ReactiveMongo

I have a case classe to store my userOption that I insert into my User. The structure of my user is as such: { "_id":ObjectId("55d54d05ece39a6cf774c3e4"), "main":{ "providerId":"userpass", "userId":"test1@email.com", …
odroz
  • 151
  • 1
  • 6
0
votes
1 answer

ReactiveMongo: How to select more than one document from a collection randomly?

I've found this example... but it shows how to select one document from a collection randomly, while I need to select more than one document and as efficiently as possible.
j3d
  • 9,492
  • 22
  • 88
  • 172
0
votes
1 answer

Cannot resolve symbol in routes file with intellij 14 and play framework 2.4 reactivemongo

I'm using IntelliJ 14.1.4 and Play framework 2.4. I copied some code from this github project: https://github.com/JAVEO/play-reactivemongo-polymer to test out reactivemongo. Basically, I copied the Posts.scala to my controller folder. It's a…
yang
  • 498
  • 5
  • 22
0
votes
0 answers

disable Reactive Mongo plugin in Play 2.3.x

Is there a way to disable the Reactive Mongo plugin on the command line in Play 2.3.x? Something like play.evolutions.enabled=false. My use case is that I have certain servers that talk to Mongo only & some that talk to another DB only. I want the…
Foo L
  • 10,977
  • 8
  • 40
  • 52
0
votes
1 answer

"java.lang.RuntimeException: null" while querying with Reactive Mongo 0.11

I'm trying to query a collection with findAll with selector = {} on JsonCollection with Play 2.4.2 and Reactive Mongo 0.11.5. Query fails in method foldM deep inside the play.api.libs.iteratee while calling method collect[List]. Last code that I…
0
votes
0 answers

ReactiveMongo connector hitting ConnectionNotInitialized exception

I've been working on a Spark Streaming application which interfaces with MongoDB via the reactivemongo connector. However, the Spark job is hitting the following exception 16:53:23.153 [ForkJoinPool-4-worker-5] ERROR reactivemongo.api.Failover2 -…
jithinpt
  • 1,204
  • 2
  • 16
  • 33
0
votes
1 answer

How to use ReactiveMongoDB and doc.getAs with a complex object?

I am working with the Play framework and ReactiveMongoDB. I am trying to write a reader and a writer for my class called Customer. This is all being done in the models.scala file in the following order: import reactivemongo.bson._ case class…
pitchblack408
  • 2,913
  • 4
  • 36
  • 54
0
votes
1 answer

play reactivemongo error after upgrade to 0.11.0

I just upgraded play reactivemongo from 0.10.5.0.AKKA23 to 0.11.0.play24. However, i got the following error with the code which compiles fine before the upgrade. val gridFS = new GridFS(db) val file = gridFS.find(BSONDocument("filename" -> new…
vaj oja
  • 1,151
  • 2
  • 16
  • 47
0
votes
2 answers

Matching result of MongoController.serve

MongoController provides serve function to serve the result of a query (as a Cursor). I just want to do something different than letting serve return NotFound, like sending some other default file. I'm wondering if it is possible to use pattern…
0
votes
1 answer

ReactiveMongo Extensions: Bulk update using reactive mongo extensions

Is there any way to update bulk records. I am trying to update user object using following code: .update($doc("_id" $in (usersIds: _*)), users, GetLastError(), false , true) In above code i am passing, users List. in user list i also add new…
0
votes
1 answer

Play authentication with scala/reactivemongo

I want to implement play-2 auth with scala for authentication with reactive mongo. I tried a lot but not able to get it non-blocking through out.. This is my USER Controller import scala.concurrent.Future import org.mindrot.jbcrypt.BCrypt import…
0
votes
2 answers

Successful CRUD but for lasterror in play reactivemongo 2.3.8

Have successfully used the play (2.3.8) reactive Scala sample code to connect and create/read from mongo instance but cannot shake LastError which haunts me as I initially misconfigured host name. Enabling debugging: logger.reactivemongo=DEBUG shows…
1 2 3
9
10