title: scala.tools.reflect.ToolBoxError exception
body: <p>I am stuck on a problem and can't resolve it. 
  Today, I get an error while building the project. This error is described in topic:
  <a href="https://stackoverflow.com/questions/30088274/why-do-i-get-conflicting-cross-version-in-sbt-on-one-environment-but-not-another">Why do I get conflicting cross-version in sbt on one environment but not another?</a></p>
  
  <p>As I understand the new version of scala was released (2.12.0-M1) and dependencies was broken.
  The answer on this question is to override "org.scala-lang" and "scala-compiler" dependency using code:</p>
  
  <pre><code>dependencyOverrides += "org.scala-lang" % "scala-compiler" % scalaVersion.value
  </code></pre>
  
  <p>My scalaVersion is <code>scalaVersion := "2.11.1"</code>.
  This resolved the problem with building the project.
  The server runs successfully, but when I try call <code>DB</code> object (that extends <code>Instance</code>) to perform a query I get an exception:</p>
  
  <pre><code>play.api.Application$$anon$1: Execution exception[[RuntimeException: java.lang.ExceptionInInitializerError]]
          at play.api.Application$class.handleError(Application.scala:296) ~[play_2.11-2.3.7.jar:2.3.7]
          at play.api.DefaultApplication.handleError(Application.scala:402) [play_2.11-2.3.7.jar:2.3.7]
          at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$3$$anonfun$applyOrElse$4.apply(PlayDefaultUpstreamHandler.scala:320) [play_2.11-2.3.7.jar:2.3.7]
          at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$3$$anonfun$applyOrElse$4.apply(PlayDefaultUpstreamHandler.scala:320) [play_2.11-2.3.7.jar:2.3.7]
          at scala.Option.map(Option.scala:146) [scala-library-2.11.6.jar:na]
  Caused by: java.lang.RuntimeException: java.lang.ExceptionInInitializerError
          at play.api.mvc.ActionBuilder$$anon$1.apply(Action.scala:523) ~[play_2.11-2.3.7.jar:2.3.7]
          at play.api.mvc.Action$$anonfun$apply$1$$anonfun$apply$4$$anonfun$apply$5.apply(Action.scala:130) ~[play_2.11-2.3.7.jar:2.3.7]
          at play.api.mvc.Action$$anonfun$apply$1$$anonfun$apply$4$$anonfun$apply$5.apply(Action.scala:130) ~[play_2.11-2.3.7.jar:2.3.7]
          at play.utils.Threads$.withContextClassLoader(Threads.scala:21) ~[play_2.11-2.3.7.jar:2.3.7]
          at play.api.mvc.Action$$anonfun$apply$1$$anonfun$apply$4.apply(Action.scala:129) ~[play_2.11-2.3.7.jar:2.3.7]
  Caused by: java.lang.ExceptionInInitializerError: null
          at models.dao.UserDAO$.getUser(UserDAO.scala:32) ~[classes/:na]
          at controllers.User$$anonfun$login$1.apply(User.scala:82) ~[classes/:na]
          at controllers.User$$anonfun$login$1.apply(User.scala:80) ~[classes/:na]
          at play.api.mvc.ActionBuilder$$anonfun$apply$16.apply(Action.scala:433) ~[play_2.11-2.3.7.jar:2.3.7]
          at play.api.mvc.ActionBuilder$$anonfun$apply$16.apply(Action.scala:432) ~[play_2.11-2.3.7.jar:2.3.7]
  Caused by: scala.tools.reflect.ToolBoxError: reflective compilation has failed: cannot initialize the compiler due to java.lang.VerifyError: scala/tools/reflect/ToolBoxFactory$ToolBoxImpl$ToolBoxGlobal
          at scala.tools.reflect.ToolBoxFactory$ToolBoxImpl$withCompilerApi$api$.liftedTree1$1(ToolBoxFactory.scala:344) ~[scala-compiler-2.11.1.jar:na]
          at scala.tools.reflect.ToolBoxFactory$ToolBoxImpl$withCompilerApi$api$.compiler$lzycompute(ToolBoxFactory.scala:330) ~[scala-compiler-2.11.1.jar:na]
          at scala.tools.reflect.ToolBoxFactory$ToolBoxImpl$withCompilerApi$api$.compiler(ToolBoxFactory.scala:329) ~[scala-compiler-2.11.1.jar:na]
          at scala.tools.reflect.ToolBoxFactory$ToolBoxImpl$withCompilerApi$.liftedTree2$1(ToolBoxFactory.scala:356) ~[scala-compiler-2.11.1.jar:na]
          at scala.tools.reflect.ToolBoxFactory$ToolBoxImpl$withCompilerApi$.apply(ToolBoxFactory.scala:354) ~[scala-compiler-2.11.1.jar:na]
  Caused by: java.lang.VerifyError: scala/tools/reflect/ToolBoxFactory$ToolBoxImpl$ToolBoxGlobal
          at scala.tools.reflect.ToolBoxFactory$ToolBoxImpl$withCompilerApi$api$.liftedTree1$1(ToolBoxFactory.scala:334) ~[scala-compiler-2.11.1.jar:na]
          at scala.tools.reflect.ToolBoxFactory$ToolBoxImpl$withCompilerApi$api$.compiler$lzycompute(ToolBoxFactory.scala:330) ~[scala-compiler-2.11.1.jar:na]
          at scala.tools.reflect.ToolBoxFactory$ToolBoxImpl$withCompilerApi$api$.compiler(ToolBoxFactory.scala:329) ~[scala-compiler-2.11.1.jar:na]
          at scala.tools.reflect.ToolBoxFactory$ToolBoxImpl$withCompilerApi$.liftedTree2$1(ToolBoxFactory.scala:356) ~[scala-compiler-2.11.1.jar:na]
          at scala.tools.reflect.ToolBoxFactory$ToolBoxImpl$withCompilerApi$.apply(ToolBoxFactory.scala:354) ~[scala-compiler-2.11.1.jar:na]
  </code></pre>
  
  <p>I think it is related to scala update and configuration issues, because yesterday I worked with the same services without any exceptions.</p>
  
  <p>My <code>build.sbt</code>:</p>
  
  <pre><code>name := """XXXX"""
  
  version := "1.0-SNAPSHOT"
  
  lazy val root = (project in file(".")).enablePlugins(PlayScala)
  
  scalaVersion := "2.11.1"
  
  dependencyOverrides += "org.scala-lang" % "scala-compiler" % scalaVersion.value
  
  libraryDependencies ++= Seq(
    jdbc,
    anorm,
    cache,
    ws,
    "org.sorm-framework" % "sorm" % "0.3.18",
    "com.typesafe.play" %% "play-mailer" % "2.4.0",
    "com.typesafe.play" %% "play-json" % "2.3.7",
    "postgresql" % "postgresql" % "9.1-901.jdbc4",
    "com.sksamuel.scrimage" %% "scrimage-core" % "1.4.2",
    "com.sksamuel.scrimage" %% "scrimage-canvas" % "1.4.2",
    "com.sksamuel.scrimage" %% "scrimage-filters" % "1.4.2",
    "com.notnoop.apns" % "apns" % "1.0.0.Beta6",
    "org.scalatest" % "scalatest_2.11" % "2.2.4" % "test"
  )
  </code></pre>
  
  <p>Any ideas why this happens?</p>
  
  <p>Thank you</p>