bash0r
bash0r

Reputation: 804

Play Framework 2.3 MongoDB

I'm trying to develop a little web app with the play framework 2.3 in scala. For this application I need access to a MongoDB instance. For now I could configure my build to download the dependencies for morphia. This is the entry in dependencies for morphia:

libraryDependencies += "com.google.code.maven-play-plugin.org.playframework.modules.morphia" % "play-morphia" % "1.2.12"

During compilation the play compiler complains about a missing class play.db.Model. The exact error messages are these:

Error:Play 2 Compiler:  Class play.db.Model not found - continuing with a stub.
Error:Play 2 Compiler:                                              ^
Warning:Play 2 Compiler:  Class play.db.Model not found - continuing with a stub.
Warning:Play 2 Compiler:  Class play.data.binding.ParamNode not found - continuing with a stub.
Warning:Play 2 Compiler:  Class play.mvc.Scope not found - continuing with a stub.
Warning:Play 2 Compiler:  9 warnings found

Am I missing some dependency or configuration?

Thanks in advance!

Upvotes: 1

Views: 323

Answers (2)

Indrajeet
Indrajeet

Reputation: 647

Try with this in build.sbt

"org.mongodb.morphia" % "morphia" % "0.109"

Upvotes: 3

Felipe
Felipe

Reputation: 11887

I think you are trying to use a library that was written for Play 1.x.

There is, however, a new plugin for Play version 2

Look at this link for more on how to use it.

Upvotes: 0

Related Questions