Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compiler Error : com.sun.tools.javac.code.Symbol$CompletionFailure: class file for akka.actor.SupervisorStrategy$1 not found

I am using JDK8 with IntelliJ IDEA Ultimate 2017.1 (tried it on my Win x64 - java version 1.8.0_92-windows-x64)

I have big multi-module Maven project. I am launching Maven goal "clean package" from a main module with packaging type "pom" and everything is OK. Maven shows me "BUILD SUCCESS" But when I'm trying to run project it shows me line of text that can't be clicked:

"Compiler Error : com.sun.tools.javac.code.Symbol$CompletionFailure: class file for akka.actor.SupervisorStrategy$1 not found"

I have tried everything possible - in every class that uses Supervisor strategy's methods i added import static akka.actor.SupervisorStrategy.start and etc. but no success.

Any hints or anyone experienced this kind of behavior as well? I think This appears to be due some class is being missed in my classpath but anyway I don't know how to solve this problem...

like image 554
ruslangm Avatar asked Feb 05 '23 12:02

ruslangm


2 Answers

For Community 2017.2 version of IntelliJ changing compiler from Javac to Eclipse solved the problem

Settings -> Build, Exec.. -> Compiler -> Java Compiler -> Use Compiler : Eclipse

like image 181
tworec Avatar answered Feb 07 '23 18:02

tworec


When I get this problem, most of the time it is because I'm doing a static import of a Scala object function in my Java code. Maven seems to compile it fine, but IntelliJ does not seem to like it for whatever reason. So if you are doing this (or anyone else reading this), remove the static import and call the object's function directly from the Object.

like image 29
User Avatar answered Feb 07 '23 19:02

User