Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/mongodb/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/scala/19.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Play Framework 2.3 MongoDB_Mongodb_Scala_Playframework 2.3 - Fatal编程技术网

Play Framework 2.3 MongoDB

Play Framework 2.3 MongoDB,mongodb,scala,playframework-2.3,Mongodb,Scala,Playframework 2.3,我正在尝试用scala中的play framework 2.3开发一个小型web应用程序。对于这个应用程序,我需要访问MongoDB实例。现在我可以配置我的构建来下载morphia的依赖项。这是morphia依赖项中的条目: libraryDependencies += "com.google.code.maven-play-plugin.org.playframework.modules.morphia" % "play-morphia" % "1.2.12" 在编译过程中,play编译器抱

我正在尝试用scala中的play framework 2.3开发一个小型web应用程序。对于这个应用程序,我需要访问MongoDB实例。现在我可以配置我的构建来下载morphia的依赖项。这是morphia依赖项中的条目:

libraryDependencies += "com.google.code.maven-play-plugin.org.playframework.modules.morphia" % "play-morphia" % "1.2.12"
在编译过程中,play编译器抱怨缺少类
play.db.Model
。确切的错误消息如下所示:

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
我是否缺少一些依赖项或配置


提前谢谢

我认为您正在尝试使用为Play 1.x编写的库

但是,


查看了解有关如何使用它的更多信息。

在build.sbt中尝试使用此功能

“org.mongodb.morphia”%“morphia”%“0.109”


我认为您需要向sbt配置文件添加其他依赖项;请看这个问题的例子:Mhh。。。你知道缺少什么库吗?Morphia插件没有被积极维护。它对play-2.3不起作用,但即使它起作用了。。。不应使用未维护的项目。我认为您应该使用-Casbah或ReactiveMongo中的一个。谢谢,但这并没有让我走得更远,因为第二个链接中提到的所有存储库似乎都已关闭。我真的不想自己建立依赖关系。不过还是要谢谢你。这就解决了问题。:)谢谢