Scalac internal error


I used the Scala Plugin for over a month now - but suddenly it stopped working. I simply receive the following error on 'Make':

Error:Scalac internal error: class java.lang.ClassNotFoundException [$, Method),, java.lang.ClassLoader.loadClass(, sun.misc.Launcher$AppClassLoader.loadClass(, java.lang.ClassLoader.loadClass(, java.lang.ClassLoader.loadClassInternal(, java.lang.Class.forName0(Native Method), java.lang.Class.forName(, org.jetbrains.plugins.scala.compiler.rt.ScalacRunner.main(]$ Method)
Error:java.lang.Class.forName0(Native Method)

This occured around the time I upgraded the IDE version to 9.02 EAP (94.585) - but that can't be it, because even after downgrading (plus removing .IntelliJIdea90) it wouldn't work again. It doesn't matter if I use a Java or Maven module - same thing.
Couldn't find anything in the idea.log files either. Also I wasn't able to gather anything useful from the other messages on this board regarding this issue.

Any ideas?


the stacktrace reminds me of the one i get if the compilation server is not running, but supposed to be used


I didn't know Intellij was using a compilation server - or do you mean fsc? How did you fix it?

I attached my scala compiler settings:
Is there anything else to configure?
I don't have SCALA_HOME set - but it used to work fine without.
PS: I'm using Scala 2.8.0-Beta1 (which worked for weeks).


i switched it off and told the compiler not to use it
(at intellij compiler settings)


It's more interesting about what Scala compiler are you using, and what libraries are you using as dependencies? If it doesn't match, then you can have problems like ClassNotFoundException.

Best regards,
Alexander Podkhalyuzin.


Well, I figured out what was wrong - the compiler and library jar defined in the facet were not there anymore. I took me hours to looks there - maybe the error message can be more specific about this.

Yet, I received another error afterwards: Error:Compiler internal  error. Process terminated with exit code 1
The only remedy I found was to completely remove Intellij as well as the config - then I re-installed it and copied the non-plugin related config files over the new ones (to get my keymap etc. back).



there is a secret option you can switch on in a xml file which enabled logging the actual error (forgot where). *maybe* this error should be shown to the user by default?


This secret option it to turn on the logging of scalac's output. It is documented here.

I agree that the detail of such errors should be displayed by default.


i added the xml config.

Where will the more detailed error message show up?
It's not showing up in the intelllij log console. i only see "Compiler internal error"




In my case, I had to unselect "use scala compiler libraries from specified jars" in the project structure dialog

I have scala installed on my system and it is on the PATH, so I guess, it is picked up from there...


Had the same problems and did what Raoul suggested and it worked. SCALA_HOME and PATH are set to a different Scala-Version. So I thought this is the point. But since I want to be sure that the newest Scala-Version (in my case is used I changed the SCALA_HOME and PATH to point to the (the same as I have been setting up in Intellij first too). And it still works. Strange, but it works.


Please sign in to leave a comment.