Boot exception when restarting Play
Asked Answered
D

2

31

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.

Disherison answered 21/5, 2015 at 7:12 Comment(3)
I usually run play via SBT Task run configuration, haven't you try it?Mirador
No solution found to the actual problem yet, but in place of running it via IntelliJ, I run it via "activator run" and this problem never occurs in that environment.Disherison
Worked using "activator run" instead of Idea - have you reported the bug?Valeda
C
54

Try invalidating Intellij IDEA cache via

File -> Invalidate Caches / Restart

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

Consuetudinary answered 1/3, 2016 at 9:6 Comment(1)
I performed just the restart and it fixed the problem; just restart is much faster than invalidate + restart FWIW.Canned
R
8

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.

Reconvert answered 17/7, 2019 at 11:38 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.