Reputation: 844
I am quite new to reactivemongo and Play framework. I was working on a Play application when time to add MongoDB connection came. I decided to go with reactiveMongo and made everything according to the tutorial here: https://github.com/sgodbillon/reactivemongo-demo-app
The problem that I am experiencing is that after I added the plugin and configured it I started receiving empty responses(ERR_EMPTY_RESPONSE) from the application. As soon as I remove the plugin and it's initialization I start receving again my proper web app responses with HTML text.
Here is the build file:
object ApplicationBuild extends Build {
val appName = "webapp"
val appVersion = "1.0-SNAPSHOT"
val appDependencies = Seq(
// Add your project dependencies here,
jdbc,
anorm,
"org.reactivemongo" %% "play2-reactivemongo" % "0.10-SNAPSHOT"
)
val main = play.Project(appName, appVersion, appDependencies).settings(
resolvers += "Sonatype Snapshots" at "http://oss.sonatype.org/content/repositories/snapshots/"
)
}
plugins config file is typical, just one line:
400:play.modules.reactivemongo.ReactiveMongoPlugin
Here is my console output during the start and page opening:
--- (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 'users'! Servers:
[localhost:27017]
[info] play - Application started (Dev)
[WARN] [08/16/2013 23:12:28.922] [New I/O worker #1] [EventStream(akka://play)] [akka.event-handlers] config is deprecat
ed, use [akka.loggers]
What could be the cause of such behavior?
Upvotes: 2
Views: 634
Reputation: 844
After a bunch of iterations I figured out this was a version mismatch problem, binary incompatility. Always make sure you check what version was used to compile every library, as sometimes it doesn't display an error about being binary incompatible.
Upvotes: 3