1
votes

I had a perfectly good working Scala Play 2.3 app using ReactiveMongo running on Heroku against a MongoLab 2.6 database, now that MongoLab have updated their sandbox databases to 3.0 I can not get my app to start up.

I have updated my local database to 3.0.

I have followed the instructions on http://reactivemongo.org/releases/0.11/documentation/tutorial/play2.html for 2.3, but I still get a stacktrace as follows:

--- (Running the application from SBT, auto-reloading is enabled) ---

[info] play - Listening for HTTP on /0:0:0:0:0:0:0:0:9000

(Server started, use Ctrl+D to stop and go back to the console...)

[info] application - ReactiveMongoPlugin starting... [info] application - ReactiveMongoPlugin successfully started with db 'sites'! Servers: [localhost:27017] [info] play - Application started (Dev) [ERROR] [10/02/2015 11:34:11.472] [play-akka.actor.default-dispatcher-7] [ActorSystem(play)] Uncaught error from thread [play-akka.actor.default-dispatcher-7] shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled java.lang.AbstractMethodError at akka.actor.ActorCell.receiveMessage(ActorCell.scala:516) at akka.actor.ActorCell.invoke(ActorCell.scala:487) at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:238) at akka.dispatch.Mailbox.run(Mailbox.scala:220) at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:393) at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)

[ERROR] [10/02/2015 11:34:11.473] [play-akka.actor.default-dispatcher-8] [ActorSystem(play)] Uncaught error from thread [play-akka.actor.default-dispatcher-8] shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled java.lang.AbstractMethodError Uncaught error from thread [play-akka.actor.default-dispatcher-7] shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled for ActorSystem[play] java.lang.AbstractMethodError at akka.actor.ActorCell.receiveMessage(ActorCell.scala:516) at akka.actor.ActorCell.invoke(ActorCell.scala:487) at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:238) at akka.dispatch.Mailbox.run(Mailbox.scala:220) at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:393) at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) at akka.actor.ActorCell.create(ActorCell.scala:580) at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) at akka.actor.ActorCell.invokeAll$1(ActorCell.scala:456) at akka.actor.ActorCell.systemInvoke(ActorCell.scala:478)

I've updated my references from ...default.BSONCollection to ...bson.BSONCollection etc.

I'm using the following config:

mongodb.uri = "mongodb://localhost:27017/sites" 

mongo-async-driver {   

  akka {

    loglevel = WARNING   

  } 

}

My app dependency is:

"org.reactivemongo" %% "play2-reactivemongo" % "0.11.7.play23")

Please can someone advise on what the above stacktrace actually means as I can't figure that out?

1
Experiencing similar issue, cannot get my play app to authenticate against mongolab. Keep getting authorization errors.Darcys22

1 Answers

1
votes

Not entirely sure whats going on in your stacktrace but it looks like that setting akka.jvm-exit-on-fatal-error is just causing your app to crash rather than output what is causing the crash

Reading through the docs you might be able to disable it by doing something like this:

jvm-exit-on-fatal-error = off

In your akka config. Then you might get some more detailed stacktrace

http://doc.akka.io/docs/akka/snapshot/general/configuration.html

However I was also getting a fatal error after the Mongo 3.0 upgrade on MongoLab. My Error was this:

DatabaseException['not authorized for query on auth-test.user' (code = 13)]

Caused by 3.0 using a different authentication then 2.6

mongo 2.6 uses MONGODB-CR auth protocol and 3.0 uses MONGODB-SHA-1 by default

To solve I changed my MongoURI to include authMode like this:

mongodb.uri = "mongodb://user:[email protected]:49431/DBName?authMode=scram-sha1"