build scala项目时出现:org.jetbrains.jps.incremental.scala.remote.ServerException

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)

可以从以下几个方面进行考虑:

  1. jdk与scala版本是否冲突
  2. 代码中是否存在递归过深的情况
  3. case class的字段是否过多

你可能感兴趣的:(exception)