Error running ensime-source-buffer-loaded-hook - OSX with ENSIME and Emacs

Go To StackoverFlow.com

2

I get the following error when trying to start ENSIME on OSX through Emacs

Error running ensime-source-buffer-loaded-hook

I am following the instructions from the github source page

  1. Scala Mode is Working
  2. ENSIME Server appears to be installed, is there any way to verify this?
  3. The sbt plugin is installed and I have a .ensime config file generated

Starting Emacs gives me the above error. When I manually try M-x ensime I get the following:

Failed to connect to Swank: server process exited.
2012-04-04 07:56
by Jacob Groundwater
More info needed. put (setq debug-on-error t) and add trace information to your question - kindahero 2012-04-04 08:49
I could not get the debugger start using that command, I inserted (debug 'debug) right before the line that produces the error test https://gist.github.com/230026 - Jacob Groundwater 2012-04-04 10:42


1

Okay, here's how I solved it:

Locate the ensime folder and run bin/server /tmp/ensime.port. I got the error:

java -classpath ... org.ensime.server.Server ./port
Unrecognized VM option '+DoEscapeAnalysis'
Could not create the Java virtual machine.

I have no idea what DoEscapeAnalysis is for, but I tried deleting it from bin/server and now everything seems to work.

See here: https://gist.github.com/2300737

2012-04-04 12:17
by Jacob Groundwater
can you please mark your answer as correct - Mirzhan Irkegulov 2012-04-04 14:12
There is a mandatory waiting-period for marking your own answers correct. I will do so when that's up - Jacob Groundwater 2012-04-05 00:56


1

For my case on Windows 7, with the same error message, but the root cause was the original setting for the maximum heap size -Xmx1512M was too large, I had to change to -Xmx768M to get over the error message.

I had also removed the byte compiled elisp code, and restart to avoid another error of "call time out".

2012-10-28 10:00
by Yu Shen


0

I also had this error on linux with emacs 24.3.1 and resolved it by specifying the full path to java in bin/server.

2013-09-24 23:23
by EdwardGarson
Ads