Delpoying play application on heroku
i have some problem with deploying play + java application on Heroku. Deploying to heroku successful but Application error. Logs :
-----> Play 2.x - Java app detected
-----> Installing JDK 1.8... done
-----> Running: sbt compile stage [info] Loading global plugins from /tmp/scala_buildpack_build_dir/.sbt_home/plugins
[info] Loading settings from plugins.sbt ...
[info] Loading project definition from /tmp/scala_buildpack_build_dir/project
[info] Loading settings from build.sbt ...
[info] Set current project to AttractionPark (in build file:/tmp/scala_buildpack_build_dir/)
[info] Executing in batch mode. For better performance use sbt's shell
[info] Compiling 15 Scala sources to /tmp/scala_buildpack_build_dir/target/scala-2.12/classes ...
[info] Done compiling.
[success] Total time: 17 s, completed Jan 15, 2018 8:15:24 PM
[info] Packaging /tmp/scala_buildpack_build_dir/target/scala-2.12/attractionpark_2.12-1.0-SNAPSHOT-sources.jar ...
[info] Done packaging.
[info] Wrote /tmp/scala_buildpack_build_dir/target/scala-2.12/attractionpark_2.12-1.0-SNAPSHOT.pom
[info] Main Scala API documentation to /tmp/scala_buildpack_build_dir/target/scala-2.12/api...
[info] Packaging /tmp/scala_buildpack_build_dir/target/scala-2.12/attractionpark_2.12-1.0-SNAPSHOT.jar ...
[info] Done packaging.
[info] Packaging /tmp/scala_buildpack_build_dir/target/scala-2.12/attractionpark_2.12-1.0-SNAPSHOT-web-assets.jar ...
[info] Done packaging.
model contains 60 documentable templates
[info] Main Scala API documentation successful.
[info] Packaging /tmp/scala_buildpack_build_dir/target/scala-2.12/attractionpark_2.12-1.0-SNAPSHOT-javadoc.jar ...
[info] Done packaging.
[info] Packaging /tmp/scala_buildpack_build_dir/target/scala-2.12/attractionpark_2.12-1.0-SNAPSHOT-sans-externalized.jar ...
[info] Done packaging.
[success] Total time: 11 s, completed Jan 15, 2018 8:15:36 PM
[INFO] [01/15/2018 20:15:36.324] [Thread-2] [CoordinatedShutdown(akka://sbt-web)] Starting coordinated shutdown from JVM shutdown hook
-----> Dropping ivy cache from the slug
-----> Dropping sbt boot dir from the slug
-----> Dropping compilation artifacts from the slug
-----> Discovering process types Procfile declares types -> console, web
-----> Compressing... Done: 98.1M
-----> Launching... Released v5
https://kursovya.herokuapp.com/ deployed to Heroku
build.sbt :
name := """AttractionPark"""
version := "1.0-SNAPSHOT"
lazy val root = (project in file(".")).enablePlugins(PlayJava, PlayEbean)
scalaVersion := "2.12.2"
libraryDependencies += guice
routesGenerator := InjectedRoutesGenerator
libraryDependencies ++= Seq(
jdbc,
javaCore,
"org.postgresql" % "postgresql" % "42.1.3",
javaWs,
ws
)
enablePlugins(JavaAppPackaging)
libraryDependencies += "com.typesafe.play" %% "play-mailer" % "6.0.1"
libraryDependencies += "com.typesafe.play" %% "play-mailer-guice" % "6.0.1"
val appDependencies = Seq(
"com.github.scribejava" % "scribejava-apis" % "5.0.0",
filters
)
// Testing libraries for dealing with CompletionStage...
libraryDependencies += "org.assertj" % "assertj-core" % "3.6.2" % Test
libraryDependencies += "org.awaitility" % "awaitility" % "2.0.0" % Test
// Make verbose tests
testOptions in Test := Seq(Tests.Argument(TestFrameworks.JUnit, "-a", "-v"))
I use play 2.6 + java. On localhost it's worked, database on clever-cloud
PS
heroku logs -t
2018-01-15T21:55:33.092875+00:00 heroku[web.1]: State changed from crashed to starting 2018-01-15T21:55:37.941657+00:00 heroku[web.1]: Starting process with command target/universal/stage/bin/play-getting-started -Dhttp.port=${PORT} 2018-01-15T21:55:40.157779+00:00 app[web.1]: Setting JAVA_TOOL_OPTIONS defaults based on dyno size. Custom settings will override them. 2018-01-15T21:55:40.158289+00:00 app[web.1]: bash: target/universal/stage/bin/play-getting-started: No such file or directory 2018-01-15T21:55:40.252199+00:00 heroku[web.1]: State changed from starting to crashed 2018-01-15T21:55:40.236976+00:00 heroku[web.1]: Process exited with status 127
PSS I decided this problem, i have diffrent names between heroku application and play application
链接地址: http://www.djcxy.com/p/95146.html上一篇: 数学问题关于.Net中的点旋转