Scala Play 2.2 application crashes after deploying in Heroku: target/start No such file or directory

≯℡__Kan透↙ 提交于 2019-12-01 03:34:45
S-C

Play 2.2 changed the name and location of the file used to start your app

http://www.playframework.com/documentation/2.2.x/Production

For example, to start an application of the project ‘foo’ from the project folder, update your Procfile to run:

target/universal/stage/bin/foo

See Deploy to Heroku, especially Connecting to a database section.

NRA

I solved it as follows (possibly already answered but here are my steps)

$ heroku local web

Got the following output in the console

forego | starting web.1 on port 5000
web.1  | /bin/bash: target/bin/Service: Permission denied

Then I did

$chmod 777 target/bin/Service

and problem resolved.

Here, Service is the name of my application (as specified in pom.xml org.codehaus.mojo plugin) and here is what my Procfile file content looks like

web: target/bin/Service -Dhttp.port=${PORT} ${JAVA_OPTS} -DapplyEvolutions.default=true -Ddb.default.driver=org.postgresql.Driver -Ddb.default.url=${DATABASE_URL}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!