3
votes

I try to deploy a new created Play app to Heroku and I get the exception below. By the way it happens also when I try to run it with play debug. It only works with the activator app. Any idea what to change to be able to deploy it on heroku? I bet there is a repo missing or something.

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

It seems the file is only in the ivy style repo of typesafe, but when I change the resolver to this:

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

i get this error:

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

so it seems the actor-client is found but three other dependencies not and it seems also not working to use both typesafe repos at once :( Any idea?

Edit: I have investigated a bit, if I use these resolvers:

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)

It checks all repos properly:

[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

But as soon as I add the normal typesafe repo as third:

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/"

All resolvers will be ignored and it only checks from a typesafe repository with name "Typesafe Releases Repository" what is not configurated at all:

[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

I FOUND A WORKING SOLUTION FOR ME:

Once you open the play app with activator there will be a new file at project/play-fork-run.sbt which contains this line:

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

This sbt plugin depends on the actor jar which leads to not being able to deploy on Heroku. If I delete play-fork-run.sbt I can deploy the project on Heroku. It's only a temp solution since if you open the app with the activator the dependency will be added again, but at least it's possible to deploy the app.

1
did you try this? - singhakash
tried it, but still not working... - Sebastian Sachtleben
Same here.. still no solution - woooh77
I have added a temp solution in the question so its possible at least to deploy on heroku... - Sebastian Sachtleben
Any updates to this issue? - toidiu

1 Answers

0
votes

Not sure if this question is still relevant in 2018, but the answer would be to use sbt instead of Activator.