gpt4 book ai didi

java - 使用 IntelliJ Remote.serverException 时出现 Scala 错误

转载 作者:行者123 更新时间:2023-12-01 08:52:07 26 4
gpt4 key购买 nike

我正在 scala 中运行我的第一个程序来打印 hello world。程序如下

object Main {
def main(args: Array[String]) {
println("Hello World")
}
}

我遇到异常

Error:scalac: Error: org.jetbrains.jps.incremental.scala.remote.ServerException
java.lang.reflect.InvocationTargetException

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:483)

at sbt.compiler.RawCompiler.apply(RawCompiler.scala:26)

at sbt.compiler.AnalyzingCompiler$$anonfun$compileSources$1$$anonfun$apply$2.apply(AnalyzingCompiler.scala:146)

at sbt.compiler.AnalyzingCompiler$$anonfun$compileSources$1$$anonfun$apply$2.apply(AnalyzingCompiler.scala:142)

at sbt.IO$.withTemporaryDirectory(IO.scala:291)

at sbt.compiler.AnalyzingCompiler$$anonfun$compileSources$1.apply(AnalyzingCompiler.scala:142)

at sbt.compiler.AnalyzingCompiler$$anonfun$compileSources$1.apply(AnalyzingCompiler.scala:139)

at sbt.IO$.withTemporaryDirectory(IO.scala:291)

at sbt.compiler.AnalyzingCompiler$.compileSources(AnalyzingCompiler.scala:139)

at sbt.compiler.IC$.compileInterfaceJar(IncrementalCompiler.scala:52)

at org.jetbrains.jps.incremental.scala.local.CompilerFactoryImpl$.org$jetbrains$jps$incremental$scala$local$CompilerFactoryImpl$$getOrCompileInterfaceJar(CompilerFactoryImpl.scala:93)

at org.jetbrains.jps.incremental.scala.local.CompilerFactoryImpl$$anonfun$getScalac$1.apply(CompilerFactoryImpl.scala:50)

at org.jetbrains.jps.incremental.scala.local.CompilerFactoryImpl$$anonfun$getScalac$1.apply(CompilerFactoryImpl.scala:49)

at scala.Option.map(Option.scala:146)

at org.jetbrains.jps.incremental.scala.local.CompilerFactoryImpl.getScalac(CompilerFactoryImpl.scala:49)

at org.jetbrains.jps.incremental.scala.local.CompilerFactoryImpl.createCompiler(CompilerFactoryImpl.scala:22)

at org.jetbrains.jps.incremental.scala.local.CachingFactory$$anonfun$createCompiler$1.apply(CachingFactory.scala:24)

at org.jetbrains.jps.incremental.scala.local.CachingFactory$$anonfun$createCompiler$1.apply(CachingFactory.scala:24)

at org.jetbrains.jps.incremental.scala.local.Cache$$anonfun$getOrUpdate$2.apply(Cache.scala:20)

at scala.Option.getOrElse(Option.scala:121)

at org.jetbrains.jps.incremental.scala.local.Cache.getOrUpdate(Cache.scala:19)

at org.jetbrains.jps.incremental.scala.local.CachingFactory.createCompiler(CachingFactory.scala:23)

at org.jetbrains.jps.incremental.scala.local.LocalServer.compile(LocalServer.scala:22)

at org.jetbrains.jps.incremental.scala.remote.Main$.make(Main.scala:67)

at org.jetbrains.jps.incremental.scala.remote.Main$.nailMain(Main.scala:24)

at org.jetbrains.jps.incremental.scala.remote.Main.nailMain(Main.scala)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:483)

at com.martiansoftware.nailgun.NGSession.run(NGSession.java:319)

Caused by: java.lang.VerifyError: Uninitialized object exists on backward branch 209
Exception Details:
Location:
scala/collection/immutable/HashMap$HashTrieMap.split()Lscala/collection/immutable/Seq; @249: goto
Reason:
Error exists in the bytecode
Bytecode:
0000000: 2ab6 0057 04a0 001e b200 afb2 00b4 04bd
0000010: 0002 5903 2a53 c000 b6b6 00ba b600 bec0
0000020: 00c0 b02a b600 31b8 003b 3c1b 04a4 015e
0000030: 1b05 6c3d 2a1b 056c 2ab6 0031 b700 c23e
0000040: 2ab6 0031 021d 787e 3604 2ab6 0031 0210
0000050: 201d 647c 7e36 05bb 0014 59b2 00b4 2ab6
0000060: 0033 c000 b6b6 00c6 b700 c91c b600 cd3a
0000070: 0619 06c6 001a 1906 b600 d1c0 007d 3a07
0000080: 1906 b600 d4c0 007d 3a08 a700 0dbb 00d6
0000090: 5919 06b7 00d9 bf19 073a 0919 083a 0abb
00000a0: 0002 5915 0419 09bb 0014 59b2 00b4 1909
00000b0: c000 b6b6 00c6 b700 c903 b800 df3a 0e3a
00000c0: 0d03 190d b900 e301 0019 0e3a 1136 1036
00000d0: 0f15 0f15 109f 0027 150f 0460 1510 190d
00000e0: 150f b900 e602 00c0 0005 3a17 1911 1917
00000f0: b800 ea3a 1136 1036 0fa7 ffd8 1911 b800
0000100: eeb7 005c 3a0b bb00 0259 1505 190a bb00
0000110: 1459 b200 b419 0ac0 00b6 b600 c6b7 00c9
0000120: 03b8 00df 3a13 3a12 0319 12b9 00e3 0100
0000130: 1913 3a16 3615 3614 1514 1515 9f00 2715
0000140: 1404 6015 1519 1215 14b9 00e6 0200 c000
0000150: 053a 1819 1619 18b8 00f1 3a16 3615 3614
0000160: a7ff d819 16b8 00ee b700 5c3a 0cb2 00f6
0000170: b200 b405 bd00 0259 0319 0b53 5904 190c
0000180: 53c0 00b6 b600 bab6 00f9 b02a b600 3303
0000190: 32b6 00fb b0
Stackmap Table:
same_frame(@35)
full_frame(@141,{Object[#2],Integer,Integer,Integer,Integer,Integer,Object[#105]},{})
append_frame(@151,Object[#125],Object[#125])
full_frame(@209,{Object[#2],Integer,Integer,Integer,Integer,Integer,Object[#105],Object[#125],Object[#125],Object[#125],Object[#125],Top,Top,Object[#20],Object[#55],Integer,Integer,Object[#103]},{Uninitialized[#159],Uninitialized[#159],Integer,Object[#125]})
full_frame(@252,{Object[#2],Integer,Integer,Integer,Integer,Integer,Object[#105],Object[#125],Object[#125],Object[#125],Object[#125],Top,Top,Object[#20],Object[#55],Integer,Integer,Object[#103]},{Uninitialized[#159],Uninitialized[#159],Integer,Object[#125]})
full_frame(@312,{Object[#2],Integer,Integer,Integer,Integer,Integer,Object[#105],Object[#125],Object[#125],Object[#125],Object[#125],Object[#2],Top,Object[#20],Object[#55],Integer,Integer,Object[#103],Object[#20],Object[#55],Integer,Integer,Object[#103]},{Uninitialized[#262],Uninitialized[#262],Integer,Object[#125]})
full_frame(@355,{Object[#2],Integer,Integer,Integer,Integer,Integer,Object[#105],Object[#125],Object[#125],Object[#125],Object[#125],Object[#2],Top,Object[#20],Object[#55],Integer,Integer,Object[#103],Object[#20],Object[#55],Integer,Integer,Object[#103]},{Uninitialized[#262],Uninitialized[#262],Integer,Object[#125]})
full_frame(@395,{Object[#2],Integer},{})


at scala.collection.immutable.HashMap$.scala$collection$immutable$HashMap$$makeHashTrieMap(HashMap.scala:179)

at scala.collection.immutable.HashMap$HashMap1.updated0(HashMap.scala:211)

at scala.collection.immutable.HashMap.$plus(HashMap.scala:59)

at scala.collection.immutable.HashMap.$plus(HashMap.scala:62)

at scala.collection.immutable.Map$Map4.updated(Map.scala:201)

at scala.collection.immutable.Map$Map4.$plus(Map.scala:202)

at scala.collection.immutable.Map$Map4.$plus(Map.scala:180)

at scala.collection.mutable.MapBuilder.$plus$eq(MapBuilder.scala:29)

at scala.collection.mutable.MapBuilder.$plus$eq(MapBuilder.scala:25)

at scala.collection.generic.Growable.$anonfun$$plus$plus$eq$1(Growable.scala:59)

at scala.collection.generic.Growable$$Lambda$51/31444105.apply(Unknown Source)

at scala.collection.mutable.ResizableArray.foreach(ResizableArray.scala:59)

at scala.collection.mutable.ResizableArray.foreach$(ResizableArray.scala:52)

at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:48)

at scala.collection.generic.Growable.$plus$plus$eq(Growable.scala:59)

at scala.collection.generic.Growable.$plus$plus$eq$(Growable.scala:50)

at scala.collection.mutable.MapBuilder.$plus$plus$eq(MapBuilder.scala:25)

at scala.collection.generic.GenMapFactory.apply(GenMapFactory.scala:48)

at scala.sys.package$.env(package.scala:61)

at scala.tools.nsc.settings.ScalaSettings.defaultClasspath(ScalaSettings.scala:30)

at scala.tools.nsc.settings.ScalaSettings.defaultClasspath$(ScalaSettings.scala:30)

at scala.tools.nsc.settings.MutableSettings.defaultClasspath(MutableSettings.scala:19)

at scala.tools.nsc.settings.ScalaSettings.$init$(ScalaSettings.scala:57)

at scala.tools.nsc.settings.MutableSettings.<init>(MutableSettings.scala:20)

at scala.tools.nsc.Settings.<init>(Settings.scala:12)

at scala.tools.nsc.Driver.process(Driver.scala:41)

at scala.tools.nsc.Main.process(Main.scala)

... 34 more

我是 Scala 新手。因此无法找出异常。我用谷歌搜索并尝试将项目sdk从java 8更改为java 7。但它不起作用。我使用的是intellij IDEA 2016.3.4和scala 2.12。

最佳答案

我解决了这个问题。问题出在java上。我删除了所有以前版本的java,并安装了最新的版本。

关于java - 使用 IntelliJ Remote.serverException 时出现 Scala 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42324602/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com