开发者

ensime scala errors (class scala.Array not found, object scala not found)

I've installed ensime according to the README.md file, however, I get errors in the inferior-ensime-server buffer with the following:

INFO: Fatal Error: scala.tools.nsc.MissingRequirementError: object scala not found.
scala.tools.nsc.MissingRequirementError: object scala not found.
    at scala.tools.nsc.symtab.Definitions$definitions$.getModuleOrClass(Definitions.scala:516)
    at scala.tools.nsc.symtab.Definitions$definitions$.ScalaPackage(Definitions.scala:43)
    at scala.tools.nsc.symtab.Definitions$definitions$.ScalaPackageClass(Definitions.scala:44)
    at scala.tools.nsc.symtab.Definitions$definitions$.UnitClass(Definitions.scala:89)
    at scala.tools.nsc.symtab.Definitions$definitions$.init(Definitions.scala:786)
    at scala.tools.nsc.Global$Run.(Global.scala:593)
    at scala.tools.nsc.interactive.Global$TyperRun.(Global.scala:473)
    at scala.tools.nsc.interactive.Global.newTyperRun(Global.scala:535)
    at scala.tools.nsc.interactive.Global.reloadSources(Global.scala:289)
    at scala.tools.nsc.interactive.Global$$anonfun$reload$1.apply(Global.scala:300)
    at scala.tools.nsc.interactive.Global$$anonfun$reload$1.apply(Global.scala:300)
    at scala.tools.nsc.interactive.Global.respond(Global.scala:276)
    at scala.tools.nsc.interactive.Global.reload(Global.scala:300)
    at scala.tools.nsc.interactive.CompilerControl$$anon$1.apply$mcV$sp(CompilerControl.scala:81)
    at scala.tools.nsc.interactive.Global.pollForWork(Global.scala:132)
    at scala.tools.nsc.interactive.Global$$anon$2.run(Global.scala:192)

also:

INFO: Fatal Error: scala.tools.nsc.MissingRequirementError: class scala.Array not found.
scala.tools.nsc.MissingRequirementError: class scala.Array not found.
    at scala.tools.nsc.symtab.Definitions$definitions$.getModuleOrClass(Definitions.scala:516)
    at scala.tools.nsc.symtab.Definitions$definitions$.getClass(Definitions.scala:474)
    at scala.tools.nsc.symtab.Definitions$definitions$.ArrayClass(Definitions.scala:217)
    at scala.tools.nsc.backend.icode.TypeKinds$REFERENCE.(TypeKinds.scala:258)
    at scala.tools.nsc.backend.icode.GenICode$ICodePhase.(GenICode.scala:55)
    at scala.tools.nsc.backend.icode.GenICode.newPhase(GenICode.scala:43)
    at scala.tools.nsc.backend.icode.GenICode.newPhase(GenICode.scala:25)
    at scala.tools.nsc.Global$Run$$anonfun$4.apply(Global.scala:606)
    at scala.tools.nsc.Global$Run$$anonfun$4.apply(Global.scala:605)
    at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:62)
    at scala.collection.immutable.List.foreach(List.scala:46)
    at scala.tools.nsc.Global$Run.(Global.scala:605)
    at scala.tools.nsc.interactive.Global$TyperRun.(Global.scala:473)
    at scala.tools.nsc.interactive.Global.newTyperRun(Global.scala:535)
    at scala.tools.nsc.interactive.Globa开发者_运维知识库l.reloadSources(Global.scala:289)
    at scala.tools.nsc.interactive.Global.typedTreeAt(Global.scala:309)
    at scala.tools.nsc.interactive.Global$$anonfun$getTypedTreeAt$1.apply(Global.scala:326)
    at scala.tools.nsc.interactive.Global$$anonfun$getTypedTreeAt$1.apply(Global.scala:326)
    at scala.tools.nsc.interactive.Global.respond(Global.scala:276)
    at scala.tools.nsc.interactive.Global.getTypedTreeAt(Global.scala:326)
    at scala.tools.nsc.interactive.CompilerControl$$anon$2.apply$mcV$sp(CompilerControl.scala:89)
    at scala.tools.nsc.interactive.Global.pollForWork(Global.scala:132)
    at scala.tools.nsc.interactive.Global$$anon$2.run(Global.scala:192)

Also none of the type identification works for me, I get 'NA' if I get anything at all. C-c t causes emacs to lock up.

I'm running:

Ubuntu 10.04 (64bit version)

emacs 23.1.50.1

ensime from git (as of 3 May 2010)

scala is version 2.8.0.RC1

java is 1.6.0_20 (from sun)

here is a copy of the log: http://dl.dropbox.com/u/5309017/ensime.log

Thanks!

Jeff


"scala.tools.nsc.MissingRequirementError: object scala not found" usually means that the standard Scala libarary cannot be found. Have a look at the inferior ensime server buffer, and it should print the classpath that's being used. Here's an excerpt from mine:

INFO: [Classpath = /usr/lib/jvm/java-6-openjdk/jre/lib/resources.jar:/usr/lib/jvm/java-6-openjdk/jre/lib/rt.jar:/usr/lib/jvm/java-6-openjdk/jre/lib/jsse.jar:/usr/lib/jvm/java-6-openjdk/jre/lib/jce.jar:/usr/lib/jvm/java-6-openjdk/jre/lib/charsets.jar:/usr/lib/jvm/java-6-openjdk/jre/lib/rhino.jar:/usr/lib/jvm/java-6-openjdk/jre/lib/ext/dnsns.jar:/usr/lib/jvm/java-6-openjdk/jre/lib/ext/pulse-java.jar:/usr/lib/jvm/java-6-openjdk/jre/lib/ext/sunjce_provider.jar:/usr/lib/jvm/java-6-openjdk/jre/lib/ext/sunpkcs11.jar:/usr/lib/jvm/java-6-openjdk/jre/lib/ext/localedata.jar:/usr/lib/jvm/java-6-openjdk/jre/lib/ext/gnome-java-bridge.jar:/home/aemon/src/misc/ensime/lib/jnotify/jnotify-0.93.jar:/home/aemon/src/misc/ensime/lib/scala/scala-library.jar:/home/aemon/src/misc/ensime/lib/scala/scala-compiler.jar]

Notice the scala-library.jar, second from the end. You probably have to modify your .ensime file so that the :classpath field points to the library jar.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜