我正在尝试在 Heroku 中发布一个 Play 框架应用程序。我按照这里的说明进行操作。我也有以下依赖项
java
play framework 1.2.4
mongolab
morphia 1.6.2a
当我使用命令“heroku open”在heroku中打开应用程序时。它显示错误如下..,
Oops, an error occured
This exception has been logged with id 6ac06o8hm.
但是该项目在本地运行没有任何问题,指向本地 MongoDB 数据库。
例外
2012-05-14T10:17:30+00:00 app[web.1]:
2012-05-14T10:17:30+00:00 app[web.1]: NullPointerException occure
d : null
2012-05-14T10:17:30+00:00 app[web.1]: at play.mvc.ActionInvoker
.invoke(ActionInvoker.java:231)
2012-05-14T10:17:30+00:00 app[web.1]: play.exceptions.JavaExecuti
onException
2012-05-14T10:17:30+00:00 app[web.1]: at Invocation.HTTP Reques
t(Play!)
2012-05-14T10:17:30+00:00 app[web.1]: at com.mongodb.CommandRes
ult.getException(CommandResult.java:64)
2012-05-14T10:17:30+00:00 app[web.1]: Caused by: java.lang.NullPo
interException
2012-05-14T10:17:30+00:00 app[web.1]: at com.mongodb.DBPort.che
ckAuth(DBPort.java:308)
2012-05-14T10:17:30+00:00 app[web.1]: at com.mongodb.DBTCPConne
ctor.call(DBTCPConnector.java:201)
2012-05-14T10:17:30+00:00 app[web.1]: at com.mongodb.CommandRes
ult.throwOnError(CommandResult.java:116)
2012-05-14T10:17:30+00:00 app[web.1]: at com.mongodb.DBApiLayer
$MyCollection.__find(DBApiLayer.java:303)
2012-05-14T10:17:30+00:00 heroku[router]: GET smooth-lightning-41
34.herokuapp.com/favicon.ico dyno=web.1 queue=0 wait=0ms service=
58ms status=500 bytes=417
2012-05-14T10:17:30+00:00 app[web.1]: at com.mongodb.DBCursor._
hasNext(DBCursor.java:490)
2012-05-14T10:17:30+00:00 app[web.1]: at com.mongodb.DBCursor._
check(DBCursor.java:360)
2012-05-14T10:17:30+00:00 app[web.1]: at com.google.code.morphi
a.query.QueryImpl.asList(QueryImpl.java:255)
2012-05-14T10:17:30+00:00 app[web.1]: at com.mongodb.DBCursor.h
asNext(DBCursor.java:515)
2012-05-14T10:17:30+00:00 app[web.1]: at play.modules.morphia.M
odel$MorphiaQuery.asList(Model.java:1320)
更新
-----> Heroku receiving push
-----> Fetching custom buildpack... done
-----> Play! app detected
-----> Installing Play! -.....
-----> Error installing Play! framework or unsupported Play! fram
ework version specified. Please review Dev Center for a list of s
upported versions.
! Heroku push rejected, failed to compile Play! app
To git@heroku.com:young-spring-3743.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:young-spring-3
743.git'