Question

I run typesafe activator example play-slick

https://www.typesafe.com/activator/template/play-slick

but I compile it by sbt instead of activator command. even I delete all javascript in views, there is still errors.

the error as below:

when I run it, it give me error:

   ! @6gkhpk9fi - Internal server error, for (GET) [/] ->

    play.PlayExceptions$AssetCompilationException: Compilation error[Internal Closur
e Compiler error (see logs)]
        at play.core.jscompile.JavascriptCompiler$.compile(JavascriptCompiler.sc
ala:63) ~[na:na]
        at play.PlayAssetsCompiler$$anonfun$JavascriptCompiler$3.apply(PlayAsset
sCompiler.scala:96) ~[na:na]
        at play.PlayAssetsCompiler$$anonfun$JavascriptCompiler$3.apply(PlayAsset
sCompiler.scala:96) ~[na:na]
        at play.PlayAssetsCompiler$$anonfun$AssetsCompiler$1$$anonfun$3.liftedTr
ee1$1(PlayAssetsCompiler.scala:52) ~[na:na]
        at play.PlayAssetsCompiler$$anonfun$AssetsCompiler$1$$anonfun$3.apply(Pl
ayAssetsCompiler.scala:51) ~[na:na]
        at play.PlayAssetsCompiler$$anonfun$AssetsCompiler$1$$anonfun$3.apply(Pl
ayAssetsCompiler.scala:48) ~[na:na]
java.lang.RuntimeException: java.lang.RuntimeException: com.google.javascript.js
comp.deps.SortedDependencies$MissingProvideException: module$index
        at com.google.javascript.jscomp.Compiler.runInCompilerThread(Compiler.ja
va:715)
        at com.google.javascript.jscomp.Compiler.compile(Compiler.java:647)
        at com.google.javascript.jscomp.Compiler.compile(Compiler.java:603)
        at com.google.javascript.jscomp.Compiler.compile(Compiler.java:585)
        at play.core.jscompile.JavascriptCompiler$$anonfun$1.apply$mcZ$sp(Javasc
riptCompiler.scala:54)
        at play.core.jscompile.JavascriptCompiler$$anonfun$1.apply(JavascriptCom
piler.scala:54)
        at play.core.jscompile.JavascriptCompiler$$anonfun$1.apply(JavascriptCom
piler.scala:54)
        at scala.util.control.Exception$Catch$$anonfun$either$1.apply(Exception.
scala:124)
        at scala.util.control.Exception$Catch$$anonfun$either$1.apply(Exception.
scala:124)
        at scala.util.control.Exception$Catch.apply(Exception.scala:102)
        at scala.util.control.Exception$Catch.either(Exception.scala:124)
        at play.core.jscompile.JavascriptCompiler$.compile(JavascriptCompiler.sc
ala:54)
        at play.PlayAssetsCompiler$$anonfun$JavascriptCompiler$3.apply(PlayAsset
sCompiler.scala:96)
        at play.PlayAssetsCompiler$$anonfun$JavascriptCompiler$3.apply(PlayAsset
sCompiler.scala:96)
        at play.PlayAssetsCompiler$$anonfun$AssetsCompiler$1$$anonfun$3.liftedTr
ee1$1(PlayAssetsCompiler.scala:52)
        at play.PlayAssetsCompiler$$anonfun$AssetsCompiler$1$$anonfun$3.apply(Pl
ayAssetsCompiler.scala:51)
        at play.PlayAssetsCompiler$$anonfun$AssetsCompiler$1$$anonfun$3.apply(Pl
ayAssetsCompiler.scala:48)
        at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(Traversable
Like.scala:251)
        at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(Traversable
Like.scala:251)
        at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.
scala:59)
        at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:47)
        at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:
251)
        at scala.collection.AbstractTraversable.flatMap(Traversable.scala:105)
        at play.PlayAssetsCompiler$$anonfun$AssetsCompiler$1.apply(PlayAssetsCom
piler.scala:48)
        at play.PlayAssetsCompiler$$anonfun$AssetsCompiler$1.apply(PlayAssetsCom
piler.scala:21)
        at scala.Function7$$anonfun$tupled$1.apply(Function7.scala:35)
        at scala.Function7$$anonfun$tupled$1.apply(Function7.scala:34)
        at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
        at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:42)
        at sbt.std.Transform$$anon$4.work(System.scala:64)
        at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:23
7)
        at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:23
7)
        at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
        at sbt.Execute.work(Execute.scala:244)
        at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
        at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
        at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestric
tions.scala:160)
        at sbt.CompletionService$$anon$2.call(CompletionService.scala:30)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:47
1)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:615)
        at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.RuntimeException: com.google.javascript.jscomp.deps.SortedD
ependencies$MissingProvideException: module$index
        at com.google.common.base.Throwables.propagate(Throwables.java:160)
        at com.google.javascript.jscomp.Compiler.processAMDAndCommonJSModules(Co
mpiler.java:1560)
        at com.google.javascript.jscomp.Compiler.parseInputs(Compiler.java:1336)

        at com.google.javascript.jscomp.Compiler.parse(Compiler.java:764)
        at com.google.javascript.jscomp.Compiler.compileInternal(Compiler.java:7
23)
        at com.google.javascript.jscomp.Compiler.access$000(Compiler.java:83)
        at com.google.javascript.jscomp.Compiler$2.call(Compiler.java:650)
        at com.google.javascript.jscomp.Compiler$2.call(Compiler.java:647)
        at com.google.javascript.jscomp.Compiler$3.call(Compiler.java:677)
        ... 4 more
    Caused by: com.google.javascript.jscomp.deps.SortedDependencies$MissingProvideEx
    ception: module$index
        at com.google.javascript.jscomp.deps.SortedDependencies.getInputProvidin
    g(SortedDependencies.java:120)
        at com.google.javascript.jscomp.JSModuleGraph.createEntryPointInputs(JSM
    oduleGraph.java:466)
        at com.google.javascript.jscomp.JSModuleGraph.manageDependencies(JSModul
    eGraph.java:375)
        at com.google.javascript.jscomp.Compiler.processAMDAndCommonJSModules(Co
    mpiler.java:1544)
        ... 11 more
    [error] C:\git\play-slick\app\assets\javascripts\index.js: Compilation error[Int
    ernal Closure Compiler error (see logs)]
    [error] (compile:managedResources) @6gkhpm6kn: Compilation error in C:\git\play-
    slick\app\assets\javascripts\index.js:null
    [error] application -

the logs/application.log

 2013-12-24 21:18:05,638 - [ERROR] - from application in New I/O worker #1 


! @6gkjah3n7 - Internal server error, for (GET) [/] ->

play.PlayExceptions$AssetCompilationException: Compilation error[Internal Closure Compiler error (see logs)]
at play.core.jscompile.JavascriptCompiler$.compile(JavascriptCompiler.scala:63) ~[na:na]
at play.PlayAssetsCompiler$$anonfun$JavascriptCompiler$3.apply(PlayAssetsCompiler.scala:96) ~[na:na]
at play.PlayAssetsCompiler$$anonfun$JavascriptCompiler$3.apply(PlayAssetsCompiler.scala:96) ~[na:na]
at play.PlayAssetsCompiler$$anonfun$AssetsCompiler$1$$anonfun$3.liftedTree1$1(PlayAssetsCompiler.scala:52) ~[na:na]
at play.PlayAssetsCompiler$$anonfun$AssetsCompiler$1$$anonfun$3.apply(PlayAssetsCompiler.scala:51) ~[na:na]
at play.PlayAssetsCompiler$$anonfun$AssetsCompiler$1$$anonfun$3.apply(PlayAssetsCompiler.scala:48) ~[na:na]
at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:251) ~[scala-library.jar:na]
at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:251) ~[scala-library.jar:na]
at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59) ~[scala-library.jar:na]
at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:47) ~[scala-library.jar:na]
at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:251) ~[scala-library.jar:na]
at scala.collection.AbstractTraversable.flatMap(Traversable.scala:105) ~[scala-library.jar:na]
at play.PlayAssetsCompiler$$anonfun$AssetsCompiler$1.apply(PlayAssetsCompiler.scala:48) ~[na:na]
at play.PlayAssetsCompiler$$anonfun$AssetsCompiler$1.apply(PlayAssetsCompiler.scala:21) ~[na:na]
at scala.Function7$$anonfun$tupled$1.apply(Function7.scala:35) ~[scala-library.jar:na]
at scala.Function7$$anonfun$tupled$1.apply(Function7.scala:34) ~[scala-library.jar:na]
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47) ~[scala-library.jar:na]
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:42) ~[na:na]
at sbt.std.Transform$$anon$4.work(System.scala:64) ~[na:na]
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237) ~[na:na]
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237) ~[na:na]
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18) ~[na:na]
at sbt.Execute.work(Execute.scala:244) ~[na:na]
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237) ~[na:na]
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237) ~[na:na]
at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:160) ~[na:na]
at sbt.CompletionService$$anon$2.call(CompletionService.scala:30) ~[na:na]
at java.util.concurrent.FutureTask.run(FutureTask.java:262) ~[na:1.7.0_45]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) ~[na:1.7.0_45]
at java.util.concurrent.FutureTask.run(FutureTask.java:262) ~[na:1.7.0_45]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_45]
at java.lang.Thread.run(Thread.java:744) [na:1.7.0_45]

2013-12-24 21:18:05,801 - [WARN] - from play in New I/O worker #1 
No application found at invoker init

According to James answer, I change the plugins.sbt, but I get the error of play 2.2.1 can not find error

[warn] ==== public: tried
[warn]   http://repo1.maven.org/maven2/play/sbt-plugin_2.10_0.13/2.2.1/sbt-plugi
n-2.2.1.pom
[warn] ==== Typesafe repository: tried
[warn]   http://repo.typesafe.com/typesafe/releases/play/sbt-plugin_2.10_0.13/2.
2.1/sbt-plugin-2.2.1.pom
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: play#sbt-plugin;2.2.1: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn]  Note: Some unresolved dependencies have extra attributes.  Check that th
ese dependencies exist with the requested attributes.
[warn]          play:sbt-plugin:2.2.1 (sbtVersion=0.13, scalaVersion=2.10)
[warn]
Was it helpful?

Solution

I think this is a bug in Play 2.2.0 (possibly just on Windows). I'll work with the author to get the template updated to Play 2.2.1. In the meantime try to upgrade your app by changing the last line in the project/plugins.sbt file to:

addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.2.1")

Then reload your browser if you are using the Activator UI.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top