When Play restarts after a file change, I occasionally get this error:
play.PlayExceptions$UnexpectedException: Unexpected exception[BootException: Cannot redefine component. ID: compiler-interface-bin_2.11.6__52.0, files: /Users/kevin/.ivy2/cache/org.scala-sbt/compiler-interface-bin_2.11.6__52.0/jars/compiler-interface-bin_2.11.6__52.0-0.13.5_20140527T130009.jar]
at play.PlayReload$$anonfun$taskFailureHandler$1.apply(PlayReload.scala:51) ~[na:na]
at play.PlayReload$$anonfun$taskFailureHandler$1.apply(PlayReload.scala:44) ~[na:na]
at scala.Option.map(Option.scala:145) ~[scala-library-2.11.6.jar:na]
at play.PlayReload$.taskFailureHandler(PlayReload.scala:44) ~[na:na]
at play.PlayReload$.compileFailure(PlayReload.scala:40) ~[na:na]
This only happens occasionally, and is always solved by restarting IntelliJ. Why is this happening, and how do I solve it?
I am running Play via IntelliJ, and I am using IntelliJ 14.1.2, Scala 2.11.6, and Play 2.3.8.
Update: This still happens in 2019.