1

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!

bash0r
  • 774
  • 6
  • 17
  • I think you will need to add other dependencies to your sbt config file; see this question for an example: http://stackoverflow.com/questions/13856266/class-broken-error-with-joda-time-using-scala – Felipe Feb 22 '15 at 01:41
  • Mhh... Any idea what libraries are missing? – bash0r Feb 22 '15 at 01:43
  • Morphia plugin is not actively maintained. It wont work for play-2.3 but even if it did... Should not use an unmaintained project. I think you should use one of - Casbah or ReactiveMongo. – sarveshseri Feb 22 '15 at 03:47

2 Answers2

3

Try with this in build.sbt

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

Indrajeet
  • 642
  • 1
  • 6
  • 12
0

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.

Felipe
  • 11,557
  • 7
  • 56
  • 103
  • Thanks, but this doesn't bring me any further since all repositories mentioned in the second link seem to be down. And I don't really want to start building dependencies on my own. But thanks anyway. – bash0r Feb 22 '15 at 01:59