build scalaプロジェクト時:org.jetbrains.jps.incremental.scala.remote.ServerException

1695 ワード

buildプロジェクト時に現れる:org.jetbrains.jps.incremental.scala.remote.ServerException
または、梱包時に次のような状況が発生します.
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building bdjob 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ bdjob ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] 
[INFO] --- scala-maven-plugin:3.2.2:add-source (scala-compile-first) @ bdjob ---
[INFO] Add Source directory: E:\workspace\xxx\src\main\scala
[INFO] Add Test Source directory: E:\workspace\xxx\src\test\scala
[INFO] 
[INFO] --- scala-maven-plugin:3.2.2:compile (scala-compile-first) @ bdjob ---
[WARNING]  Expected all dependencies to require Scala version: 2.11.0
[WARNING]  com.twitter:chill_2.11:0.8.4 requires scala version: 2.11.8
[WARNING] Multiple versions of scala libraries detected!
[INFO] E:\workspace\xxx\src\main\java:-1: info: compiling
[INFO] E:\workspace\xxx\src\main\scala:-1: info: compiling
[INFO] Compiling 10 source files to E:\workspace\xxx\target\classes at 1571638690784
[ERROR] error: java.lang.StackOverflowError
[INFO] 	at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5293)
[INFO] 	at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5330)

以下の点から考えることができます.
  • jdkとscalaバージョンが競合しているかどうか
  • コードに再帰的に深すぎる場合があるかどうか
  • case classのフィールドが
  • より多すぎるかどうか