2010-05-04 125 views
4

我已經根據README.md文件安裝了ensime,但是,我在下級服務器緩衝區中遇到以下錯誤:ensime scala錯誤(class scala.Array not found,object scala not found)

 
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) 

也:

 
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.Global.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) 

而且沒有任何的類型識別爲我工作,我得到 'NA' 如果我得到任何東西。 C-c t導致emacs鎖定。

我運行:

的Ubuntu 10.04(64位版本)
的Emacs 23.1.50.1
ensime從混帳(截至3 2010年5月)
Scala是版本2.8.0.RC1
的java是1.6.0_20(來自太陽)
這裏是日誌的副本:http://dl.dropbox.com/u/5309017/ensime.log

謝謝!
Jeff

回答

5

「scala.tools.nsc.MissingRequirementError:object scala not found」通常意味着無法找到標準的Scala libarary。看看劣勢ensim服務器緩衝區,它應該打印正在使用的類路徑。以下是我的摘錄:

信息:[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:/家庭/ aemon/src目錄/其它/ 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]

請注意scala-library.jar,從第二個開始。您可能必須修改.ensime文件,以便:classpath字段指向庫jar。

+0

太棒了!謝謝。這很好用! – 2010-05-05 04:13:28

+0

窗戶在哪裏? – 2013-11-21 02:53:36