muuki88/activator-play-cluster-sample

Unforseen error for app.js at /public : java.lang.RuntimeException: no resource

Closed this issue · 4 comments

Hello, muuki88.
Your teplate exactly what need! Thanks for the one! (and sorry for my English)
But i have problem whit it:

My environment:

  • Windows 7x64
  • Activator 1.2.10

How i make project:

activator new play-akka-cluster-sample play-akka-cluster-sample
cd play-akka-cluster-sample
sbt compile
in new concole1> sbt "project backend" "run 2551"
in new concole2> sbt "project backend" "run 2552"
in new concole3> sbt "project frontend" run

in the consoles look like evreting fine.

Than i open page "http://localhost:9000/" in my chrome browser and i see "nothing".
This is log from console3 (wher Play is running):

...
(Server started, use Ctrl+D to stop and go back to the console...)

[info] Compiling 13 Scala sources and 2 Java sources to C:\projects\play-akka-cluster-sample\frontend\target\scala-2.11\classes...
[info] JavaScript linting on 14 source(s)
[info] LESS compiling on 1 source(s)
[INFO] [09/09/2014 11:32:00.747] [play-internal-execution-context-1] [Remoting] Starting remoting
[INFO] [09/09/2014 11:32:00.819] [play-internal-execution-context-1] [Remoting] Remoting started; listening on addresses :[akka.tcp://application@127.0.0.1:54017]
[INFO] [09/09/2014 11:32:00.828] [play-internal-execution-context-1] [Cluster(akka://application)] Cluster Node [akka.tcp://application@127.0.0.1:54017] - Starting up...
[INFO] [09/09/2014 11:32:00.875] [play-internal-execution-context-1] [Cluster(akka://application)] Cluster Node [akka.tcp://application@127.0.0.1:54017] - Registered cluster JMX MBean [akka:type=Cluster]
[INFO] [09/09/2014 11:32:00.875] [play-internal-execution-context-1] [Cluster(akka://application)] Cluster Node [akka.tcp://application@127.0.0.1:54017] - Started up successfully
[info] play - Starting application default Akka system.
[info] play - Application started (Dev)
[INFO] [09/09/2014 11:32:00.948] [application-akka.actor.default-dispatcher-2] [Cluster(akka://application)] Cluster Node [akka.tcp://application@127.0.0.1:54017] - Metrics collection has started successfully
[INFO] [09/09/2014 11:32:01.112] [application-akka.actor.default-dispatcher-14] [Cluster(akka://application)] Cluster Node [akka.tcp://application@127.0.0.1:54017] - Welcome from [akka.tcp://application@127.0.0.1:2552]
[INFO] [09/09/2014 11:32:01.921] [application-akka.actor.default-dispatcher-13] [ActorSystem(application)] Factorial Service started at akka://application/user/factorialService
[debug] application - Unforseen error for app.js at /public
java.lang.RuntimeException: no resource
at controllers.Assets$$anonfun$controllers$Assets$$assetInfoFromResource$1$$anonfun$13.apply(Assets.scala:237) ~[play_2.11-2.3.1.jar:2.3.1]
at controllers.Assets$$anonfun$controllers$Assets$$assetInfoFromResource$1$$anonfun$13.apply(Assets.scala:237) ~[play_2.11-2.3.1.jar:2.3.1]
at scala.Option.getOrElse(Option.scala:120) [scala-library-2.11.1.jar:na]
at controllers.Assets$$anonfun$controllers$Assets$$assetInfoFromResource$1.apply(Assets.scala:237) ~[play_2.11-2.3.1.jar:2.3.1]
at controllers.Assets$$anonfun$controllers$Assets$$assetInfoFromResource$1.apply(Assets.scala:236) ~[play_2.11-2.3.1.jar:2.3.1]

in my Chrome-console i see:
image

it look likes the "require.js:1895" use wrong URL for load require resources,

i have looked the HTML code from chrome:
image

and the URLs looks wrong

maby this is a key for this issuie?

I've resolved the issue so far using this dirty hack:
@routes.Assets.versioned("javascripts/main.js").toString.replaceAll("\", "/")

source: playframework/playframework#3137

Thanks for reporting. I'll update the play version ASAP

Fixed with 2c79dd3