我正在使用 playframework -v 1.2.4,并使用 morphia 插件。当我运行 play test 并连接 mongolab db 时,抛出异常并出现以下错误:
Oops: RuntimeException
An unexpected error occured caused by exception RuntimeException:
MongoDB authentication failed: mydb
我的application.conf如下..,
application.mode=dev
%prod.application.mode=prod
morphia.db.host=ds033187.mongolab.com
morphia.db.port=33187
morphia.db.username=demo
morphia.db.password=demo
morphia.db.name=mydb
但上述凭据能够与 mongodb 连接
D:\mongodb-win32-i386-2.0.1\bin>mongo ds033187.mongolab.com:33187/mydb -u demo -p demo
MongoDB shell version: 2.0.1
connecting to: ds033187.mongolab.com:33187/mydb
>
但我得到了与 mongodb shell 的连接。为什么我收到此错误?