4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

playframeworkでStackOverflowErrorとなった場合の対応について

Last updated at Posted at 2015-09-19

linux(CentOS7)環境でplayframeworkを利用したアプリをコンパイルしようとしたら、

[error]
[error]      while compiling: /risachi/target/scala-2.10/src_managed/main/routes_reverseRouting.scala
[error]         during phase: erasure
[error]      library version: version 2.10.2
[error]     compiler version: version 2.10.2
    --途中省略--
[error] uncaught exception during compilation: java.lang.StackOverflowError
java.lang.StackOverflowError
        at scala.tools.nsc.typechecker.Typers$Typer.typedApply$1(Typers.scala:4621)
        at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5526)
        at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:840)
        at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5604)
        at scala.tools.nsc.typechecker.Typers$Typer.typedQualifier(Typers.scala:5689)
        at scala.tools.nsc.typechecker.Typers$Typer.typedQualifier(Typers.scala:5697)
        at scala.tools.nsc.transform.Erasure$Eraser.adaptMember(Erasure.scala:786)
    --途中省略--
        at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:840)
        at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5604)
        at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$92.apply(Typers.scala:4570)
[error] (compile:compile) java.lang.StackOverflowError

のようなエラーが発生してしまう事象が発生した。

https://github.com/playframework/playframework/issues/4146
によると、-Xss1Mを追加すればよいとのことだったが、

export PLAY_OPTS="-Xms512M -Xmx1024M -Xss1M";play compile

としても駄目だった。
色々悩んだあげく、

export PLAY_OPTS="-Xms512M -Xmx1024M -Xss4M";play compile

のように-Xssのサイズを大きくすることでコンパイルエラーが回避出来た。

4
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?