2
votes

I am working on application development using play framework having mongodb as backend, i have installed mongodb & playframework successfully on my ubuntu as well as on windows, but if i want to work with mongodb i need morphia module of play framework, i have downloaded morphia module and tries to install, but it gives me an error like this ,

root@ubuntu:~/apps/tmp1# play install morphia
[info] Loading project definition from /root/apps/tmp1/project
[info] Set current project to tmp1 (in build file:/root/apps/tmp1/)
[error] Not a valid command: install (similar: initialize, inspect, shell)
[error] Not a valid project ID: install
[error] Not a valid configuration: install (similar: optional)
[error] Not a valid key: install (similar: initialize, dist, stage)
[error] install
[error]        ^
root@ubuntu:~/apps/tmp1# 

i have even tried to change the dependencies.yml file but, still i am unable to work with it...

3

3 Answers

3
votes

It looks like you are using play 2. Look at the documentation of morphia, it clearly states:

This module is for the Play 1.x series only.

Instead of using morphia, you can use the java driver directly.

EDIT: There is a morphia plugin for play 2 available here

1
votes

I started using Marphia with play framework 2.x. I followed this example to install marphia plugin: https://github.com/czihong/playMongoDemo

0
votes

Just as a note, I forked the playMongoDemo and updated it to work with Play 2.1.4. I sent a pull request, but in the meantime, it's available here: https://github.com/subdigit/playMongoDemo

Once/If the pull request is accepted, I'll probably delete the local fork so you can use the master: https://github.com/czihong/playMongoDemo