Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Boot exception when restarting Play

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.

like image 962
Kevin Albrecht Avatar asked May 21 '15 07:05

Kevin Albrecht


2 Answers

Try invalidating Intellij IDEA cache via

File -> Invalidate Caches / Restart

It takes like 5 minutes but did the trick for me.

like image 173
Joe Avatar answered Sep 27 '22 21:09

Joe


As Ezekiel Victor mentioned in his comment:

Just restart Intellij fixed the problem for me.

This saves you quite some time, compared to invalidating Intellij IDEA cache.

like image 37
pme Avatar answered Sep 27 '22 21:09

pme