ensime scala 错误(未找到类 scala.Array,未找到对象 scala)

发布于 2024-08-31 10:26:58 字数 3838 浏览 5 评论 0原文

我已经根据 README.md 文件安装了 ensime,但是,我在 inferior-ensime-server 缓冲区中收到以下错误:

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”。 Cc t 导致 emacs 锁定。

我正在运行:

Ubuntu 10.04(64位版本)
emacs 23.1.50.1
来自 git 的 ensime(截至 2010 年 5 月 3 日)
scala 版本为 2.8.0.RC1
java是1.6.0_20(来自sun)
这是日志的副本: http://dl.dropbox.com/u/ 5309017/ensime.log

谢谢!
杰夫

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

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

莫言歌 2024-09-07 10:26:58

“scala.tools.nsc.MissingRequirementError: object scala not find”通常意味着无法找到标准 Scala 库。查看劣质 ensime 服务器缓冲区,它应该打印正在使用的类路径。这是我的摘录:

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]

注意 scala-library。罐子,倒数第二个。您可能必须修改 .ensime 文件,以便 :classpath 字段指向库 jar。

"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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文