0

I am running a web application with Scala version 2.9.0 and Scalatra version 2.1.0-SNAPSHOT. I build the application with Java 1.6. It runs fine when I run it with Java 1.7 but fails when ran with Java 1.8 with this error. What can be the issue?

It is important for me to run with java 1.8 is because I have some third party jars used in my application which are complied with java 1.8. I have other scala applications with I have built with java 1.6 and run fine with java 1.8 but I am only facing this issue with applications using scalatra.

HTTP Status 500 -

type Exception report

message

description The server encountered an internal error that prevented it from fulfilling this request.

exception

org.fusesource.scalate.TemplateException
    org.fusesource.scalate.TemplateEngine.compileAndLoad(TemplateEngine.scala:834)
    org.fusesource.scalate.TemplateEngine.compileAndLoadEntry(TemplateEngine.scala:691)
    org.fusesource.scalate.TemplateEngine.liftedTree1$1(TemplateEngine.scala:411)
    org.fusesource.scalate.TemplateEngine.load(TemplateEngine.scala:405)
    org.fusesource.scalate.TemplateEngine.load(TemplateEngine.scala:475)
    org.scalatra.scalate.ScalateSupport$class.renderScalateErrorPage(ScalateSupport.scala:140)
    org.scalatra.scalate.ScalateSupport$class.handle(ScalateSupport.scala:131)

root cause

java.lang.NullPointerException
    scala.tools.nsc.Global$Run.compileLate(Global.scala:1043)
    scala.tools.nsc.symtab.SymbolLoaders$SourcefileLoader.doComplete(SymbolLoaders.scala:303)
    scala.tools.nsc.symtab.SymbolLoaders$SymbolLoader.complete(SymbolLoaders.scala:111)
    scala.tools.nsc.symtab.SymbolLoaders$SymbolLoader.complete(SymbolLoaders.scala:85)
    scala.tools.nsc.symtab.Symbols$Symbol.info(Symbols.scala:732)
RckR
  • 45
  • 4

1 Answers1

0

The release notes for Scala 2.9 list it's dependencies: "It requires the Java runtime version 1.6 or 1.7." Scala 2.11.1 announced support for Java 8 but called that "experimental." The experimental adjective was dropped from the release notes in Scala 2.11.2, but I've had problems with Java 8 in projects using later versions of Scala (probably 2.11.7).