我第一次使用http://typesafe.com/stack/,我创建了一个简单的akka项目。我的scala版本是2.9.2我收到以下错误。
[info] Done updating.
[info] Compiling 1 Scala source to /Users/hrishikeshparanjape/git-public/web-service/target/scala-2.9.2/classes...
[info] 'compiler-interface' not yet compiled for Scala 2.9.2. Compiling...
sbt appears to be exiting abnormally.
The log file for this session is at /var/folders/26/hqgjyf0j7192hmjdsz17f3v80000gn/T/sbt2587622650679130928.log
java.lang.OutOfMemoryError: PermGen space
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
at java.util.concurrent.FutureTask.get(FutureTask.java:83)
at sbt.CompletionService$$anon$1.take(CompletionService.scala:29)
at sbt.Execute.next$1(Execute.scala:74)
at sbt.Execute.processAll(Execute.scala:77)
at sbt.Execute.runKeep(Execute.scala:57)
at sbt.EvaluateTask$.run$1(EvaluateTask.scala:109)
at sbt.EvaluateTask$.runTask(EvaluateTask.scala:124)
at sbt.Aggregation$$anonfun$7.apply(Aggregation.scala:87)
at sbt.Aggregation$$anonfun$7.apply(Aggregation.scala:85)
at sbt.EvaluateTask$.withStreams(EvaluateTask.scala:87)
at sbt.Aggregation$.runTasks(Aggregation.scala:85)
at sbt.Aggregation$$anonfun$applyDynamicTasks$1.apply(Aggregation.scala:141)
at sbt.Aggregation$$anonfun$applyDynamicTasks$1.apply(Aggregation.scala:136)
at sbt.Command$$anonfun$applyEffect$2$$anonfun$apply$3.apply(Command.scala:64)
at sbt.Command$$anonfun$applyEffect$2$$anonfun$apply$3.apply(Command.scala:64)
at sbt.Command$.process(Command.scala:92)
at sbt.MainLoop$$anonfun$next$1$$anonfun$apply$1.apply(Main.scala:121)
at sbt.MainLoop$$anonfun$next$1$$anonfun$apply$1.apply(Main.scala:121)
at sbt.State$$anon$1.process(State.scala:154)
at sbt.MainLoop$$anonfun$next$1.apply(Main.scala:121)
at sbt.MainLoop$$anonfun$next$1.apply(Main.scala:121)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
at sbt.MainLoop$.next(Main.scala:121)
at sbt.MainLoop$.run(Main.scala:114)
at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(Main.scala:103)
at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(Main.scala:100)
at sbt.Using.apply(Using.scala:25)
at sbt.MainLoop$.runWithNewLog(Main.scala:100)
at sbt.MainLoop$.runAndClearLast(Main.scala:83)
at sbt.MainLoop$.runLoggedLoop(Main.scala:67)
at sbt.MainLoop$.runLogged(Main.scala:60)
Error during sbt execution: java.lang.OutOfMemoryError: PermGen space
请帮忙。
答案 0 :(得分:5)
您的项目需要更多内存才能执行(这就是java.lang.OutOfMemoryError: PermGen space
告诉您的内容)。我从未使用过类型安全堆栈,因此我不知道是否可以直接配置内存参数。
但是如果你运行Linux,你可以输入
env JAVA_OPTS="-Xms512m -Xmx1024m -Xss1M -XX:MaxPermSize=512" <command>
其中command是执行项目的命令(可能是sbt
)。当然,如果需要更多/更少的空间,可以更改参数的大小。