I'm trying to publish a Play framework application in Heroku. I followed the instructions from here. I'm also having the following dependencies
java
play framework 1.2.4
mongolab
morphia 1.6.2a
When i open application in the heroku using commang "heroku open". It shows the error as follows..,
Oops, an error occured
This exception has been logged with id 6ac06o8hm.
But the project runs locally without any issues, pointing to a local MongoDB database.
Exception
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)
UPDATE
-----> 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 [email protected]:young-spring-3743.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '[email protected]:young-spring-3
743.git'
Looking at the logs I can see that there is a null pointer exception, so one of the things as below could be the reason:
You need to check all the above possibilities.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With