Application error in heroku using java playframework

I am trying to publish a Framework Framework application to Heroku. I followed the instructions here . I also have the following dependencies

   java
   play framework 1.2.4
   mongolab
   morphia 1.6.2a

When I open the application in the hero 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 problems, pointing to the local MongoDB database.

An 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 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'
+3
source share
1 answer

Looking at the logs, I see that there is a null pointer exception, so the reason could be one of the following things:

  • Uninitialized variable passed
  • Not registered error
  • There is a method call in an empty collection

.

+1

All Articles