Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationEventAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
4
Help us understand the problem. What are the problem?

More than 5 years have passed since last update.

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

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のサイズを大きくすることでコンパイルエラーが回避出来た。

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
4
Help us understand the problem. What are the problem?