Problem migrating to IDEA12: scala: Cannot connect to compile server at ...

Hi,
I have a sample Scala project (made by 1 unique scala script) that is configured and working with IDEA 11.

When I load the same in IDEA 12.0.1, I cannot run it anymore and I get the error
"scala: Cannot connect to compile server at ..."

The project is correctly configured with the Scala facet, pointing to the Scala SDK.

How can I solve that?

Thanks
--
Filippo

1
10 comments
Avatar
Permanently deleted user

Disable 'external build' at Settings -> Compiler

0

Please try the newest Scala plugin build (0.7.58).

0
Avatar
Permanently deleted user

Hi,

I'm having the same problem. Can someone please help.

I only have this issue on Windows box not on linux (Ubuntu). The version of Intellij, JDK, Scala plugin are the same across across both operating systems.

Intellij 12.01

JDK 7_u10

Scala plugin: 0.7.62

Error:

scala: Cannot connect to compile server at localhost/127.0.0.1:3200

11:22:41 AM Using a new (SBT-based) Scala compiler.
            In case of any compilation problems you may enable the previous (internal) compiler by clearing:
            Project Settings / Compiler / Use external build
11:22:42 AM Scala compile server
            Error: Could not create the Java Virtual Machine.
            Error: A fatal exception has occurred. Program will exit.
            
11:22:45 AM Compilation completed with 1 error and 0 warnings in 3 sec
11:22:52 AM Scala compile server
            Error: Could not create the Java Virtual Machine.
            Error: A fatal exception has occurred. Program will exit.
            
11:22:54 AM Compilation completed with 1 error and 0 warnings in 2 sec

Please help!

Cheers,

Larry

0
Avatar
Permanently deleted user

I think this problem is caused by the JVM parameters which IDEA uses to start the compile server.

I experienced the same problem. But when I lower the "JVM maximum heap size" to 512MB and cleared "JVM paramters" at the Scala section of IDE Settings, the compiler server starts normally and works fine.
Maybe the default heap sizes are too large for a 32bit Windows OS.

1
Avatar
Permanently deleted user

Hi Kohei,

Removing the settings from the Scala configuration page in IDE has fixed the issue for me on XP 32 bit.

I removed all the JVM settings and now the external build mode works. The wired thing is that when I put the same settings back into IDE again, apply, save and restart IDE. it still works. ;-()

Not sure what is going on here. But thanks for the fix. Really appreciate it!

Cheers,

Larry

0
Avatar
Permanently deleted user

That solved the problem for me too (on Windows XP).  I found that I could get it running with heap size 1200 Mb.

0

Hi..I've exactly the same problem (using xp) but I did the change and this doesn't works...could explain exactly where must I do the changes..maybe I'm doing this wrong (I did the change in settings/compiler/compiler process heap size (Mb)..is it ok??..thanks!!

0
Avatar
Permanently deleted user

It needs to go in IDE Settings -> Scala -> JVM Maximum Heap Size, MB

Screenshot_1_17_13_2_49_PM.png

0
Avatar
Permanently deleted user

Still an issue in 2016.3.1... using 32bit version, the compile server won't start with the default settings, but it will start when lowering heap size to 512.

0
Avatar
Permanently deleted user

This does not work on 2016.3.2 even with head lowered to 512. Running Ubuntu 16.04. The only way to fix this is to disable external build server.

0

Please sign in to leave a comment.