[0.10.0] Errors during deployment on Heroku

331 views
Skip to first unread message

Timo Hirt

unread,
Oct 23, 2013, 2:17:15 PM10/23/13
to reacti...@googlegroups.com
We have a Play 2.2 based app build on reactive mongo 0.10.0. Since the day we updated to version 2.2 we cannot deploy to Heroku. I tried again yesterday and now the deployment fails with the following error:

[info] Compiling 59 Scala sources and 2 Java sources to /tmp/build_b2e508e4-4f0d-4654-9496-2a6820cace3b/target/scala-2.10/classes...
       [error] /tmp/build_b2e508e4-4f0d-4654-9496-2a6820cace3b/app/models/Match.scala:484: missing arguments for method toList in trait Cursor;
       [error] follow this method with `_' if you want to treat it as a partially applied function
       [error]     collection.find(query).cursor[Match].toList
       [error]                                          ^

Any suggestions hw to solve this?

François Vatel

unread,
Oct 23, 2013, 3:22:02 PM10/23/13
to reacti...@googlegroups.com
Timo, you can change it to collection.find(query).cursor[Match].collect[List]()

but unfortunately this is not the only problem with after switching from 0.10 to 0.10.0 (at least for me) - I can see the following error at runtime:

23:11:08.384 [TocoboxActorSystem-akka.actor.default-dispatcher-16] ERROR reactivemongo.core.actors.MongoDBSystem - error while processing getNonce response #1000
reactivemongo.core.commands.DefaultCommandError: BSONCommandError['command getnonce failed because the 'ok' field is missing or equals 0'] with original doc {
  $err: BSONString(Invalid ns [.$cmd]),
  code: BSONInteger(16256)
}
    at reactivemongo.core.commands.CommandError$.apply(commands.scala:135) ~[reactivemongo_2.10-0.10.0-SNAPSHOT.jar:0.10.0-SNAPSHOT]
    at reactivemongo.core.commands.CommandError$$anonfun$checkOk$default$3$1.apply(commands.scala:146) ~[reactivemongo_2.10-0.10.0-SNAPSHOT.jar:0.10.0-SNAPSHOT]
    at reactivemongo.core.commands.CommandError$$anonfun$checkOk$default$3$1.apply(commands.scala:146) ~[reactivemongo_2.10-0.10.0-SNAPSHOT.jar:0.10.0-SNAPSHOT]
    at reactivemongo.core.commands.CommandError$$anonfun$checkOk$3.apply(commands.scala:149) ~[reactivemongo_2.10-0.10.0-SNAPSHOT.jar:0.10.0-SNAPSHOT]
    at reactivemongo.core.commands.CommandError$$anonfun$checkOk$3.apply(commands.scala:147) ~[reactivemongo_2.10-0.10.0-SNAPSHOT.jar:0.10.0-SNAPSHOT]
    at scala.Option.flatMap(Option.scala:170) ~[scala-library-2.10.3.jar:?]
    at reactivemongo.core.commands.CommandError$.checkOk(commands.scala:147) ~[reactivemongo_2.10-0.10.0-SNAPSHOT.jar:0.10.0-SNAPSHOT]
    at reactivemongo.core.commands.Getnonce$ResultMaker$.apply(commands.scala:391) ~[reactivemongo_2.10-0.10.0-SNAPSHOT.jar:0.10.0-SNAPSHOT]
    at reactivemongo.core.commands.BSONCommandResultMaker$class.apply(commands.scala:77) ~[reactivemongo_2.10-0.10.0-SNAPSHOT.jar:0.10.0-SNAPSHOT]
    at reactivemongo.core.commands.Getnonce$ResultMaker$.apply(commands.scala:389) ~[reactivemongo_2.10-0.10.0-SNAPSHOT.jar:0.10.0-SNAPSHOT]
    at reactivemongo.core.actors.MongoDBSystem$$anonfun$receive$1.applyOrElse(actors.scala:272) [reactivemongo_2.10-0.10.0-SNAPSHOT.jar:0.10.0-SNAPSHOT]

And 0.10-SNAPSHOT jar is removed from repo...

François Vatel

unread,
Oct 23, 2013, 3:48:27 PM10/23/13
to reacti...@googlegroups.com
I have figured out that the error above is related to authentication, it occurs when I do the following call:

val connection = driver.connection(
        List(mongoConf.getString("address")),
        List(Authenticate(dbName, user, password))
    )


But this works if done separately:

val connection = driver.connection(
        List(mongoConf.getString("address"))
    )
connection.authenticate(dbName, user, password)

Stephane Godbillon

unread,
Oct 30, 2013, 6:43:31 AM10/30/13
to reacti...@googlegroups.com
Hi,

That's because in the Authenticate case class, the `dbName` and `user` parameters are misplaced.  This is an error I introduced in the Authentication refactoring, I'll fix that before the release.  Meanwhile, can you test again with Authenticate(user, dbName, password) ?

Thanks,



2013/10/23 François Vatel <vate...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "ReactiveMongo - http://reactivemongo.org" group.
To unsubscribe from this group and stop receiving emails from it, send an email to reactivemong...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

daniel...@gmail.com

unread,
Oct 30, 2013, 4:17:28 PM10/30/13
to reacti...@googlegroups.com
Does this basically mean that it is currently not possible the deploy a Play 2.2 application which is using reactivemongo 0.10.0 to Heroku?
Or is there a workaround?

Stephane Godbillon

unread,
Oct 30, 2013, 8:49:52 PM10/30/13
to reacti...@googlegroups.com
No, that's totally possible, but if you use the Authenticate case class, just don't forget that `dbName` and `user` are misplaced :)
2013/10/30 <daniel...@gmail.com>

Timo Hirt

unread,
Oct 31, 2013, 3:37:14 AM10/31/13
to reacti...@googlegroups.com
We deployed our Play 2.2 app with reactive mongo 0.10.0 to heroku. 

The only thing that does not work for whatever reason is "collection.find(query).cursor[Match].toList". Francois provided a workaround in the reply to the first post.
Reply all
Reply to author
Forward
0 new messages