当前 Play 应用程序的 Heroku 部署错误

Heroku Deploy Error with current Play App

本文关键字:部署 错误 Heroku Play 应用程序 当前      更新时间:2023-09-26

我尝试将新创建的Play应用程序部署到Heroku,但出现以下异常。顺便说一下,当我尝试用play debug运行它时也会发生这种情况.它仅适用于激活器应用程序。知道要更改什么才能将其部署到 heroku 上吗?我敢打赌缺少一个回购或其他东西。

remote:        [warn]   ::::::::::::::::::::::::::::::::::::::::::::::
remote:        [warn]   ::          UNRESOLVED DEPENDENCIES         ::
remote:        [warn]   ::::::::::::::::::::::::::::::::::::::::::::::
remote:        [warn]   :: com.typesafe.sbtrc#actor-client-2-10;0.3.1: not found
remote:        [warn]   ::::::::::::::::::::::::::::::::::::::::::::::
remote:        sbt.ResolveException: unresolved dependency: com.typesafe.sbtrc#actor-client-2-10;0.3.1: not found
remote:         at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:217)
remote:         at sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:126)
remote:         at sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:125)
remote:         at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:115)
remote:         at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:115)
remote:         at sbt.IvySbt$$anonfun$withIvy$1.apply(Ivy.scala:103)
remote:         at sbt.IvySbt.sbt$IvySbt$$action$1(Ivy.scala:48)
remote:         at sbt.IvySbt$$anon$3.call(Ivy.scala:57)
remote:         at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:93)
remote:         at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:78)
remote:         at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:97)
remote:         at xsbt.boot.Using$.withResource(Using.scala:10)
remote:         at xsbt.boot.Using$.apply(Using.scala:9)
remote:         at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:58)
remote:         at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:48)
remote:         at xsbt.boot.Locks$.apply0(Locks.scala:31)
remote:         at xsbt.boot.Locks$.apply(Locks.scala:28)
remote:         at sbt.IvySbt.withDefaultLogger(Ivy.scala:57)
remote:         at sbt.IvySbt.withIvy(Ivy.scala:98)
remote:         at sbt.IvySbt.withIvy(Ivy.scala:94)
remote:         at sbt.IvySbt$Module.withModule(Ivy.scala:115)
remote:         at sbt.IvyActions$.update(IvyActions.scala:125)
remote:         at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1223)
remote:         at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1221)
remote:         at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$74.apply(Defaults.scala:1244)
remote:         at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$74.apply(Defaults.scala:1242)
remote:         at sbt.Tracked$$anonfun$lastOutput$1.apply(Tracked.scala:35)
remote:         at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1246)
remote:         at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1241)
remote:         at sbt.Tracked$$anonfun$inputChanged$1.apply(Tracked.scala:45)
remote:         at sbt.Classpaths$.cachedUpdate(Defaults.scala:1249)
remote:         at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1214)
remote:         at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1192)
remote:         at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
remote:         at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:42)
remote:         at sbt.std.Transform$$anon$4.work(System.scala:64)
remote:         at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
remote:         at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
remote:         at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
remote:         at sbt.Execute.work(Execute.scala:244)
remote:         at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
remote:         at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
remote:         at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:160)
remote:         at sbt.CompletionService$$anon$2.call(CompletionService.scala:30)
remote:         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
remote:         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
remote:         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
remote:         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
remote:         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
remote:         at java.lang.Thread.run(Thread.java:745)
remote:        [error] (*:update) sbt.ResolveException: unresolved dependency: com.typesafe.sbtrc#actor-client-2-10;0.3.1: not found
remote:        [error] Total time: 26 s, completed Mar 9, 2015 4:20:10 PM
remote:
remote:  !     ERROR: Failed to run sbt task: update
remote:
remote:
remote:  !     Push rejected, failed to compile Play 2.x - Java app

似乎该文件仅在typesafe的常春藤样式存储库中,但是当我将解析器更改为此解析器时:

resolvers += Resolver.url("Typesafe ivy repository", url("http://repo.typesafe.com/typesafe/ivy-releases/"))(Resolver.ivyStylePatterns)

我收到此错误:

remote:        [warn]   ::::::::::::::::::::::::::::::::::::::::::::::
remote:        [warn]   ::          UNRESOLVED DEPENDENCIES         ::
remote:        [warn]   ::::::::::::::::::::::::::::::::::::::::::::::
remote:        [warn]   :: com.typesafe.play#sbt-fork-run-protocol_2.10;2.3.8: not found
remote:        [warn]   :: com.typesafe.play#routes-compiler_2.10;2.3.8: not found
remote:        [warn]   :: com.typesafe.play#sbt-run-support_2.10;2.3.8: not found
remote:        [warn]   ::::::::::::::::::::::::::::::::::::::::::::::
remote:        sbt.ResolveException: unresolved dependency: com.typesafe.play#sbt-fork-run-protocol_2.10;2.3.8: not found
remote:        unresolved dependency: com.typesafe.play#routes-compiler_2.10;2.3.8: not found
remote:        unresolved dependency: com.typesafe.play#sbt-run-support_2.10;2.3.8: not found
remote:         at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:217)
remote:         at sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:126)
remote:         at sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:125)
remote:         at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:115)
remote:         at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:115)
remote:         at sbt.IvySbt$$anonfun$withIvy$1.apply(Ivy.scala:103)
remote:         at sbt.IvySbt.sbt$IvySbt$$action$1(Ivy.scala:48)
remote:         at sbt.IvySbt$$anon$3.call(Ivy.scala:57)
remote:         at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:93)
remote:         at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:78)
remote:         at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:97)
remote:         at xsbt.boot.Using$.withResource(Using.scala:10)
remote:         at xsbt.boot.Using$.apply(Using.scala:9)
remote:         at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:58)
remote:         at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:48)
remote:         at xsbt.boot.Locks$.apply0(Locks.scala:31)
remote:         at xsbt.boot.Locks$.apply(Locks.scala:28)
remote:         at sbt.IvySbt.withDefaultLogger(Ivy.scala:57)
remote:         at sbt.IvySbt.withIvy(Ivy.scala:98)
remote:         at sbt.IvySbt.withIvy(Ivy.scala:94)
remote:         at sbt.IvySbt$Module.withModule(Ivy.scala:115)
remote:         at sbt.IvyActions$.update(IvyActions.scala:125)
remote:         at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1223)
remote:         at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1221)
remote:         at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$74.apply(Defaults.scala:1244)
remote:         at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$74.apply(Defaults.scala:1242)
remote:         at sbt.Tracked$$anonfun$lastOutput$1.apply(Tracked.scala:35)
remote:         at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1246)
remote:         at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1241)
remote:         at sbt.Tracked$$anonfun$inputChanged$1.apply(Tracked.scala:45)
remote:         at sbt.Classpaths$.cachedUpdate(Defaults.scala:1249)
remote:         at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1214)
remote:         at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1192)
remote:         at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
remote:         at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:42)
remote:         at sbt.std.Transform$$anon$4.work(System.scala:64)
remote:         at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
remote:         at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
remote:         at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
remote:         at sbt.Execute.work(Execute.scala:244)
remote:         at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
remote:         at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
remote:         at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:160)
remote:         at sbt.CompletionService$$anon$2.call(CompletionService.scala:30)
remote:         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
remote:         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
remote:         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
remote:         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
remote:         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
remote:         at java.lang.Thread.run(Thread.java:745)
remote:        [error] (*:update) sbt.ResolveException: unresolved dependency: com.typesafe.play#sbt-fork-run-protocol_2.10;2.3.8: not found
remote:        [error] unresolved dependency: com.typesafe.play#routes-compiler_2.10;2.3.8: not found
remote:        [error] unresolved dependency: com.typesafe.play#sbt-run-support_2.10;2.3.8: not found
remote:        Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?
remote:  !     ERROR: Failed to run sbt task: update
remote:
remote:
remote:  !     Push rejected, failed to compile Play 2.x - Java app
因此,似乎

找到了参与者-客户端,但其他三个依赖项没有找到,并且似乎也无法同时使用两个类型安全存储库:(知道吗?

编辑:如果我使用这些解析器,我已经调查了一些:

resolvers += "Sonatype OSS Snapshots" at "http://oss.sonatype.org/content/repositories/snapshots"
resolvers += Resolver.url("Typesafe Ivy", url("http://repo.typesafe.com/typesafe/ivy-snapshots"))(Resolver.ivyStylePatterns)

它会正确检查所有存储库:

[warn]   module not found: com.typesafe.play#sbt-run-support_2.10;2.3.8
[warn] ==== typesafe-ivy-releases: tried
[warn]   http://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.play/sbt-run-support_2.10/2.3.8/ivys/ivy.xml
[warn] ==== sbt-plugin-releases: tried
[warn]   http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.play/sbt-run-support_2.10/2.3.8/ivys/ivy.xml
[warn] ==== local: tried
[warn]   /tmp/scala_buildpack_build_dir/.sbt_home/.ivy2/local/com.typesafe.play/sbt-run-support_2.10/2.3.8/ivys/ivy.xml
[warn] ==== public: tried
[warn]   http://repo1.maven.org/maven2/com/typesafe/play/sbt-run-support_2.10/2.3.8/sbt-run-support_2.10-2.3.8.pom
[warn] ==== Sonatype OSS Snapshots: tried
[warn]   http://oss.sonatype.org/content/repositories/snapshots/com/typesafe/play/sbt-run-support_2.10/2.3.8/sbt-run-support_2.10-2.3.8.pom
[warn] ==== Typesafe Ivy: tried
[warn]   http://repo.typesafe.com/typesafe/ivy-snapshots/com.typesafe.play/sbt-run-support_2.10/2.3.8/ivys/ivy.xml

但是一旦我将普通的类型安全存储库添加为第三个:

resolvers += "Sonatype OSS Snapshots" at "http://oss.sonatype.org/content/repositories/snapshots"
resolvers += Resolver.url("Typesafe Ivy", url("http://repo.typesafe.com/typesafe/ivy-snapshots"))(Resolver.ivyStylePatterns)
resolvers += "Typesafe" at "http://repo.typesafe.com/typesafe/releases/"

所有解析器都将被忽略,它只从名称为"Typesafe Release存储库"的类型安全存储库中检查根本没有配置的内容:

[warn]   module not found: com.typesafe.sbtrc#actor-client-2-10;0.3.1
[warn] ==== local: tried
[warn]   /tmp/scala_buildpack_build_dir/.sbt_home/.ivy2/local/com.typesafe.sbtrc/actor-client-2-10/0.3.1/ivys/ivy.xml
[warn] ==== public: tried
[warn]   http://repo1.maven.org/maven2/com/typesafe/sbtrc/actor-client-2-10/0.3.1/actor-client-2-10-0.3.1.pom
[warn] ==== Typesafe Releases Repository: tried
[warn]   https://repo.typesafe.com/typesafe/releases/com/typesafe/sbtrc/actor-client-2-10/0.3.1/actor-client-2-10-0.3.1.pom

为我找到了一个可行的解决方案:

使用activator打开播放应用程序后,project/play-fork-run.sbt处将有一个新文件,其中包含以下行:

addSbtPlugin("com.typesafe.play" % "sbt-fork-run-plugin" % "2.3.8")

这个 sbt 插件依赖于演员 jar,这导致无法在 Heroku 上部署。如果我删除play-fork-run.sbt我可以在 Heroku 上部署项目。这只是一个临时解决方案,因为如果您使用激活器打开应用程序,则会再次添加依赖项,但至少可以部署应用程序。

不确定这个问题在2018年是否仍然相关,但答案是使用sbt而不是Activator。