Skip to content

Instantly share code, notes, and snippets.

@joshm1
Created November 20, 2014 20:08
Show Gist options
  • Save joshm1/1615d75925dcdb3bc23e to your computer and use it in GitHub Desktop.
Save joshm1/1615d75925dcdb3bc23e to your computer and use it in GitHub Desktop.
Scala Play compiler error on Twirl template
Information:Compilation completed with 2 errors and 2 warnings in 34 sec
Information:2 errors
Information:2 warnings
Error:scalac:
while compiling: /my-project/modules/common/target/scala-2.10/twirl/main/views/html/error/notFound.template.scala
during phase: jvm
library version: version 2.10.4
compiler version: version 2.10.4
reconstructed args: -nobootcp -javabootclasspath : -deprecation -language:experimental.macros -classpath /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/lib/ant-javafx.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/lib/dt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/lib/javafx-mx.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/lib/jconsole.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/lib/sa-jdi.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/lib/tools.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/deploy.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/javaws.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/jfxswt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/management-agent.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/plugin.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/resources.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/ext/cldrdata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/ext/dnsns.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/ext/jfxrt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/ext/localedata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/ext/nashorn.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/ext/sunec.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/ext/sunpkcs11.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/ext/zipfs.jar:/my-project/modules/common/target/scala-2.10/classes:/Users/john/.ivy2/cache/org.scala-lang/scala-library/jars/scala-library-2.10.4.jar:/Users/john/.sbt/boot/scala-2.10.4/lib/scala-library.jar:/Users/john/.ivy2/cache/org.scalamacros/quasiquotes_2.10/jars/quasiquotes_2.10-2.0.1.jar:/Users/john/.ivy2/cache/org.scala-lang/scala-reflect/jars/scala-reflect-2.10.4.jar:/Users/john/.sbt/boot/scala-2.10.4/lib/scala-reflect.jar:/Users/john/.ivy2/cache/com.typesafe.play/twirl-api_2.10/jars/twirl-api_2.10-1.0.2.jar:/Users/john/.ivy2/cache/org.apache.commons/commons-lang3/jars/commons-lang3-3.1.jar:/Users/john/.ivy2/cache/com.typesafe.play/play_2.10/jars/play_2.10-2.3.5.jar:/Users/john/.ivy2/cache/com.typesafe.play/build-link/jars/build-link-2.3.5.jar:/Users/john/.ivy2/cache/com.typesafe.play/play-exceptions/jars/play-exceptions-2.3.5.jar:/Users/john/.ivy2/cache/org.javassist/javassist/jars/javassist-3.18.2-GA.jar:/Users/john/.ivy2/cache/org.javassist/javassist/bundles/javassist-3.18.2-GA.jar:/Users/john/.ivy2/cache/com.typesafe.play/play-iteratees_2.10/jars/play-iteratees_2.10-2.3.5.jar:/Users/john/.ivy2/cache/org.scala-stm/scala-stm_2.10/jars/scala-stm_2.10-0.7.jar:/Users/john/.ivy2/cache/com.typesafe/config/jars/config-1.2.1.jar:/Users/john/.ivy2/cache/com.typesafe/config/bundles/config-1.2.1.jar:/Users/john/.ivy2/cache/com.typesafe.play/play-json_2.10/jars/play-json_2.10-2.3.5.jar:/Users/john/.ivy2/cache/com.typesafe.play/play-functional_2.10/jars/play-functional_2.10-2.3.5.jar:/Users/john/.ivy2/cache/com.typesafe.play/play-datacommons_2.10/jars/play-datacommons_2.10-2.3.5.jar:/Users/john/.ivy2/cache/org.joda/joda-convert/jars/joda-convert-1.6.jar:/Users/john/.ivy2/cache/com.fasterxml.jackson.core/jackson-annotations/jars/jackson-annotations-2.3.2.jar:/Users/john/.ivy2/cache/com.fasterxml.jackson.core/jackson-annotations/bundles/jackson-annotations-2.3.2.jar:/Users/john/.ivy2/cache/com.fasterxml.jackson.core/jackson-core/jars/jackson-core-2.3.2.jar:/Users/john/.ivy2/cache/com.fasterxml.jackson.core/jackson-core/bundles/jackson-core-2.3.2.jar:/Users/john/.ivy2/cache/com.fasterxml.jackson.core/jackson-databind/jars/jackson-databind-2.3.2.jar:/Users/john/.ivy2/cache/com.fasterxml.jackson.core/jackson-databind/bundles/jackson-databind-2.3.2.jar:/Users/john/.ivy2/cache/io.netty/netty/jars/netty-3.9.3.Final.jar:/Users/john/.ivy2/cache/io.netty/netty/bundles/netty-3.9.3.Final.jar:/Users/john/.ivy2/cache/com.typesafe.netty/netty-http-pipelining/jars/netty-http-pipelining-1.1.2.jar:/Users/john/.ivy2/cache/org.slf4j/slf4j-api/jars/slf4j-api-1.7.6.jar:/Users/john/.ivy2/cache/org.slf4j/jul-to-slf4j/jars/jul-to-slf4j-1.7.6.jar:/Users/john/.ivy2/cache/org.slf4j/jcl-over-slf4j/jars/jcl-over-slf4j-1.7.6.jar:/Users/john/.ivy2/cache/ch.qos.logback/logback-core/jars/logback-core-1.1.1.jar:/Users/john/.ivy2/cache/ch.qos.logback/logback-classic/jars/logback-classic-1.1.1.jar:/Users/john/.ivy2/cache/com.typesafe.akka/akka-actor_2.10/jars/akka-actor_2.10-2.3.4.jar:/Users/john/.ivy2/cache/com.typesafe.akka/akka-slf4j_2.10/jars/akka-slf4j_2.10-2.3.4.jar:/Users/john/.ivy2/cache/commons-codec/commons-codec/jars/commons-codec-1.9.jar:/Users/john/.ivy2/cache/xerces/xercesImpl/jars/xercesImpl-2.11.0.jar:/Users/john/.ivy2/cache/xml-apis/xml-apis/jars/xml-apis-1.4.01.jar:/Users/john/.ivy2/cache/javax.transaction/jta/jars/jta-1.1.jar:/Users/john/.ivy2/cache/com.typesafe.play/play-jdbc_2.10/jars/play-jdbc_2.10-2.3.5.jar:/Users/john/.ivy2/cache/com.jolbox/bonecp/jars/bonecp-0.8.0.RELEASE.jar:/Users/john/.ivy2/cache/com.jolbox/bonecp/bundles/bonecp-0.8.0.RELEASE.jar:/Users/john/.ivy2/cache/com.h2database/h2/jars/h2-1.3.175.jar:/Users/john/.ivy2/cache/tyrex/tyrex/jars/tyrex-1.0.1.jar:/Users/john/.ivy2/cache/com.typesafe.play/play-cache_2.10/jars/play-cache_2.10-2.3.5.jar:/Users/john/.ivy2/cache/net.sf.ehcache/ehcache-core/jars/ehcache-core-2.6.8.jar:/Users/john/.ivy2/cache/com.typesafe.play/play-ws_2.10/jars/play-ws_2.10-2.3.5.jar:/Users/john/.ivy2/cache/com.google.guava/guava/jars/guava-16.0.1.jar:/Users/john/.ivy2/cache/com.google.guava/guava/bundles/guava-16.0.1.jar:/Users/john/.ivy2/cache/com.ning/async-http-client/jars/async-http-client-1.8.14.jar:/Users/john/.ivy2/cache/oauth.signpost/signpost-core/jars/signpost-core-1.2.1.2.jar:/Users/john/.ivy2/cache/oauth.signpost/signpost-commonshttp4/jars/signpost-commonshttp4-1.2.1.2.jar:/Users/john/.ivy2/cache/commons-logging/commons-logging/jars/commons-logging-1.1.1.jar:/Users/john/.ivy2/cache/com.typesafe.akka/akka-testkit_2.10/jars/akka-testkit_2.10-2.3.4.jar:/Users/john/.ivy2/cache/com.typesafe.play.plugins/play-statsd_2.10/jars/play-statsd_2.10-2.3.0.jar:/Users/john/.ivy2/cache/com.typesafe.play.plugins/play-plugins-mailer_2.10/jars/play-plugins-mailer_2.10-2.3.0.jar:/Users/john/.ivy2/cache/org.apache.commons/commons-email/jars/commons-email-1.3.2.jar:/Users/john/.ivy2/cache/javax.mail/mail/jars/mail-1.4.5.jar:/Users/john/.ivy2/cache/javax.activation/activation/jars/activation-1.1.1.jar:/Users/john/.ivy2/cache/com.typesafe.play.plugins/play-plugins-util_2.10/jars/play-plugins-util_2.10-2.3.0.jar:/Users/john/.ivy2/cache/com.typesafe.play/play-java-ws_2.10/jars/play-java-ws_2.10-2.3.4.jar:/Users/john/.ivy2/cache/com.typesafe.play/play-java_2.10/jars/play-java_2.10-2.3.4.jar:/Users/john/.ivy2/cache/org.yaml/snakeyaml/jars/snakeyaml-1.13.jar:/Users/john/.ivy2/cache/org.yaml/snakeyaml/bundles/snakeyaml-1.13.jar:/Users/john/.ivy2/cache/org.hibernate/hibernate-validator/jars/hibernate-validator-5.0.3.Final.jar:/Users/john/.ivy2/cache/javax.validation/validation-api/jars/validation-api-1.1.0.Final.jar:/Users/john/.ivy2/cache/org.jboss.logging/jboss-logging/jars/jboss-logging-3.1.1.GA.jar:/Users/john/.ivy2/cache/com.fasterxml/classmate/jars/classmate-1.0.0.jar:/Users/john/.ivy2/cache/com.fasterxml/classmate/bundles/classmate-1.0.0.jar:/Users/john/.ivy2/cache/org.springframework/spring-context/jars/spring-context-4.0.3.RELEASE.jar:/Users/john/.ivy2/cache/org.springframework/spring-core/jars/spring-core-4.0.3.RELEASE.jar:/Users/john/.ivy2/cache/org.springframework/spring-beans/jars/spring-beans-4.0.3.RELEASE.jar:/Users/john/.ivy2/cache/org.reflections/reflections/jars/reflections-0.9.8.jar:/Users/john/.ivy2/cache/dom4j/dom4j/jars/dom4j-1.6.1.jar:/Users/john/.ivy2/cache/com.google.code.findbugs/jsr305/jars/jsr305-2.0.3.jar:/Users/john/.ivy2/cache/org.apache.tomcat/tomcat-servlet-api/jars/tomcat-servlet-api-8.0.5.jar:/Users/john/.ivy2/cache/org.mindrot/jbcrypt/jars/jbcrypt-0.3m.jar:/Users/john/.ivy2/cache/org.clapper/grizzled-slf4j_2.10/jars/grizzled-slf4j_2.10-1.0.1.jar:/Users/john/.ivy2/cache/org.apache.commons/commons-compress/jars/commons-compress-1.4.1.jar:/Users/john/.ivy2/cache/org.tukaani/xz/jars/xz-1.0.jar:/Users/john/.ivy2/cache/org.apache.commons/commons-math3/jars/commons-math3-3.1.1.jar:/Users/john/.ivy2/cache/commons-io/commons-io/jars/commons-io-2.4.jar:/Users/john/.ivy2/cache/org.apache.zookeeper/zookeeper/jars/zookeeper-3.4.5.jar:/Users/john/.ivy2/cache/log4j/log4j/jars/log4j-1.2.15.jar:/Users/john/.ivy2/cache/jline/jline/jars/jline-0.9.94.jar:/Users/john/.ivy2/cache/junit/junit/jars/junit-3.8.1.jar:/Users/john/.ivy2/cache/com.cybozu.labs/langdetect/jars/langdetect-1.1-20120112.jar:/Users/john/.ivy2/cache/net.arnx/jsonic/jars/jsonic-1.2.7.jar:/Users/john/.ivy2/cache/com.amazonaws/aws-java-sdk/jars/aws-java-sdk-1.6.12.jar:/Users/john/.ivy2/cache/org.apache.httpcomponents/httpclient/jars/httpclient-4.2.jar:/Users/john/.ivy2/cache/org.apache.httpcomponents/httpcore/jars/httpcore-4.2.jar:/Users/john/.ivy2/cache/joda-time/joda-time/jars/joda-time-2.5.jar:/Users/john/.ivy2/cache/net.sf.uadetector/uadetector-resources/jars/uadetector-resources-2013.11.jar:/Users/john/.ivy2/cache/net.sf.uadetector/uadetector-resources/bundles/uadetector-resources-2013.11.jar:/Users/john/.ivy2/cache/net.sf.uadetector/uadetector-core/jars/uadetector-core-0.9.11.jar:/Users/john/.ivy2/cache/net.sf.uadetector/uadetector-core/bundles/uadetector-core-0.9.11.jar:/Users/john/.ivy2/cache/net.sf.qualitycheck/quality-check/jars/quality-check-1.3.jar:/Users/john/.ivy2/cache/javax.annotation/jsr250-api/jars/jsr250-api-1.0.jar:/Users/john/.ivy2/cache/com.google.inject/guice/jars/guice-3.0.jar:/Users/john/.ivy2/cache/javax.inject/javax.inject/jars/javax.inject-1.jar:/Users/john/.ivy2/cache/aopalliance/aopalliance/jars/aopalliance-1.0.jar:/Users/john/.ivy2/cache/org.sonatype.sisu.inject/cglib/jars/cglib-2.2.1-v20090111.jar:/Users/john/.ivy2/cache/asm/asm/jars/asm-3.1.jar:/Users/john/.ivy2/cache/com.google.inject.extensions/guice-multibindings/jars/guice-multibindings-3.0.jar:/Users/john/.ivy2/cache/net.codingwell/scala-guice_2.10/jars/scala-guice_2.10-3.0.2.jar:/Users/john/.ivy2/cache/org.imgscalr/imgscalr-lib/jars/imgscalr-lib-4.2.jar:/Users/john/.ivy2/cache/us.theatr/akka-quartz_2.10/jars/akka-quartz_2.10-0.3.0.jar:/Users/john/.ivy2/cache/org.quartz-scheduler/quartz/jars/quartz-2.1.7.jar:/Users/john/.ivy2/cache/org.jsoup/jsoup/jars/jsoup-1.7.1.jar:/Users/john/.ivy2/cache/org.bouncycastle/bcprov-jdk15on/jars/bcprov-jdk15on-1.50.jar:/Users/john/.ivy2/cache/org.msgpack/msgpack-scala_2.10/jars/msgpack-scala_2.10-0.6.8.jar:/Users/john/.ivy2/cache/org.msgpack/msgpack/jars/msgpack-0.6.8.jar:/Users/john/.ivy2/cache/org.msgpack/msgpack/bundles/msgpack-0.6.8.jar:/Users/john/.ivy2/cache/com.googlecode.json-simple/json-simple/jars/json-simple-1.1.1.jar:/Users/john/.ivy2/cache/com.googlecode.json-simple/json-simple/bundles/json-simple-1.1.1.jar:/Users/john/.ivy2/cache/org.scala-lang/scalap/jars/scalap-2.10.3.jar:/Users/john/.ivy2/cache/org.scala-lang/scala-compiler/jars/scala-compiler-2.10.3.jar:/Users/john/.ivy2/cache/com.mchange/c3p0/jars/c3p0-0.9.5-pre8.jar:/Users/john/.ivy2/cache/com.mchange/mchange-commons-java/jars/mchange-commons-java-0.2.7.jar:/my-project/modules/common/lib/AmazonElastiCacheClusterClient-1.0.jar:/my-project/modules/macros/target/scala-2.10/classes -Xplugin:/Users/john/.ivy2/cache/org.scalamacros/paradise_2.10.4/jars/paradise_2.10.4-2.0.1.jar -unchecked
last tree to typer: Literal(Constant(play.twirl.api.Html))
symbol: null
symbol definition: null
tpe: Class(classOf[play.twirl.api.Html])
symbol owners:
context owners: anonymous class anonfun$f$1 -> package error
== Enclosing template or block ==
Template( // val <local $anonfun>: <notype>, tree.tpe=views.html.error.anonfun$f$1
"scala.runtime.AbstractFunction1", "scala.Serializable" // parents
ValDef(
private
"_"
<tpt>
<empty>
)
// 3 statements
DefDef( // final def apply(requestedUrl: String): play.twirl.api.Html
<method> final <triedcooking>
"apply"
[]
// 1 parameter list
ValDef( // requestedUrl: String
<param> <triedcooking>
"requestedUrl"
<tpt> // tree.tpe=String
<empty>
)
<tpt> // tree.tpe=play.twirl.api.Html
Apply( // def apply(requestedUrl: String): play.twirl.api.Html in object notFound, tree.tpe=play.twirl.api.Html
notFound.this."apply" // def apply(requestedUrl: String): play.twirl.api.Html in object notFound, tree.tpe=(requestedUrl: String)play.twirl.api.Html
"requestedUrl" // requestedUrl: String, tree.tpe=String
)
)
DefDef( // final def apply(v1: Object): Object
<method> final <bridge>
"apply"
[]
// 1 parameter list
ValDef( // v1: Object
<param> <triedcooking>
"v1"
<tpt> // tree.tpe=Object
<empty>
)
<tpt> // tree.tpe=Object
Apply( // final def apply(requestedUrl: String): play.twirl.api.Html, tree.tpe=play.twirl.api.Html
notFound$$anonfun$f$1.this."apply" // final def apply(requestedUrl: String): play.twirl.api.Html, tree.tpe=(requestedUrl: String)play.twirl.api.Html
Apply( // final def $asInstanceOf[T0 >: ? <: ?](): T0 in class Object, tree.tpe=String
TypeApply( // final def $asInstanceOf[T0 >: ? <: ?](): T0 in class Object, tree.tpe=()String
"v1"."$asInstanceOf" // final def $asInstanceOf[T0 >: ? <: ?](): T0 in class Object, tree.tpe=[T0 >: ? <: ?]()T0
<tpt> // tree.tpe=String
)
Nil
)
)
)
DefDef( // def <init>(): views.html.error.anonfun$f$1
<method> <triedcooking>
"<init>"
[]
List(Nil)
<tpt> // tree.tpe=views.html.error.anonfun$f$1
Block( // tree.tpe=Unit
Apply( // def <init>(): scala.runtime.AbstractFunction1 in class AbstractFunction1, tree.tpe=scala.runtime.AbstractFunction1
notFound$$anonfun$f$1.super."<init>" // def <init>(): scala.runtime.AbstractFunction1 in class AbstractFunction1, tree.tpe=()scala.runtime.AbstractFunction1
Nil
)
()
)
)
)
== Expanded type of tree ==
ConstantType(value = Constant(play.twirl.api.Html))
uncaught exception during compilation: java.lang.AssertionError
Error:scalac: Error: assertion failed: List(object package$Stopwatch, object package$Stopwatch)
java.lang.AssertionError: assertion failed: List(object package$Stopwatch, object package$Stopwatch)
at scala.reflect.internal.Symbols$Symbol.suchThat(Symbols.scala:1678)
at scala.reflect.internal.Symbols$ClassSymbol.companionModule0(Symbols.scala:2988)
at scala.reflect.internal.Symbols$ClassSymbol.companionModule(Symbols.scala:2991)
at scala.tools.nsc.backend.jvm.GenASM$JPlainBuilder.genClass(GenASM.scala:1371)
at scala.tools.nsc.backend.jvm.GenASM$AsmPhase.run(GenASM.scala:120)
at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1583)
at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1557)
at scala.tools.nsc.Global$Run.compileSources(Global.scala:1553)
at scala.tools.nsc.Global$Run.compile(Global.scala:1662)
at xsbt.CachedCompiler0.run(CompilerInterface.scala:126)
at xsbt.CachedCompiler0.run(CompilerInterface.scala:102)
at xsbt.CompilerInterface.run(CompilerInterface.scala:27)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at sbt.compiler.AnalyzingCompiler.call(AnalyzingCompiler.scala:102)
at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:48)
at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:41)
at org.jetbrains.jps.incremental.scala.local.IdeaIncrementalCompiler.compile(IdeaIncrementalCompiler.scala:28)
at org.jetbrains.jps.incremental.scala.local.LocalServer.compile(LocalServer.scala:26)
at org.jetbrains.jps.incremental.scala.remote.Main$.make(Main.scala:64)
at org.jetbrains.jps.incremental.scala.remote.Main$.nailMain(Main.scala:22)
at org.jetbrains.jps.incremental.scala.remote.Main.nailMain(Main.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.martiansoftware.nailgun.NGSession.run(NGSession.java:319)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment