我正在开发一个Lift项目,并尝试使用jvm参数scala:cc
和scala编译服务器进行编译:
-Xmx1024m -Xss20m -XX:PermSize=64M -XX:MaxPermSize=512M -XX:+CMSClassUnloadingEnabled -XX:+CMSClassUnloadingEnabled
错误也会出现在JVM参数中:
-Xmx1024m -Xss20m -XX:PermSize=64M -XX:MaxPermSize=512M
结果如下:
[INFO] Compiling 16 source files to /Users/axaluss/IdeaProjects/trunk/Team_Skynet/target/classes at 1299141180948
[ERROR] java.lang.OutOfMemoryError: Java heap space
[INFO] at scala.tools.nsc.symtab.Types$class.typeRef(Types.scala:2503)
[INFO] at scala.tools.nsc.symtab.SymbolTable.typeRef(SymbolTable.scala:13)
[INFO] at scala.tools.nsc.symtab.Types$TypeMap.mapOver(Types.scala:2828)
[INFO] at scala.tools.nsc.symtab.Types$AsSeenFromMap.apply(Types.scala:3209)
[INFO] at scala.tools.nsc.symtab.Types$AsSeenFromMap.apply(Types.scala:3085)
[INFO] at scala.tools.nsc.symtab.Types$TypeMap.mapOver(Types.scala:2849)
[INFO] at scala.tools.nsc.symtab.Types$AsSeenFromMap.apply(Types.scala:3209)
[INFO] at scala.tools.nsc.symtab.Types$Type.asSeenFrom(Types.scala:507)
[INFO] at scala.tools.nsc.symtab.Types$Type.computeMemberType(Types.scala:531)
[INFO] at scala.tools.nsc.symtab.Symbols$MethodSymbol.typeAsMemberOf(Symbols.scala:1774)
[INFO] at scala.tools.nsc.symtab.Types$Type.memberType(Types.scala:522)
[INFO] at scala.tools.nsc.symtab.Types$Type.findMember(Types.scala:858)
[INFO] at scala.tools.nsc.symtab.Types$Type.nonPrivateMembers(Types.scala:453)
[INFO] at scala.tools.nsc.symtab.Types$class.lub0$1(Types.scala:4919)
[INFO] at scala.tools.nsc.symtab.Types$class.lub0$1(Types.scala:4873)
[INFO] at scala.tools.nsc.symtab.Types$class.lub(Types.scala:4943)
[INFO] at scala.tools.nsc.symtab.SymbolTable.lub(SymbolTable.scala:13)
[INFO] at scala.tools.nsc.symtab.Types$class.lubsym$1(Types.scala:4901)
[INFO] at scala.tools.nsc.symtab.Types$$anonfun$38.apply(Types.scala:4924)
[INFO] at scala.tools.nsc.symtab.Types$$anonfun$38.apply(Types.scala:4919)
[INFO] at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:61)
[INFO] at scala.collection.immutable.List.foreach(List.scala:45)
[INFO] at scala.tools.nsc.symtab.Types$class.lub0$1(Types.scala:4919)
[INFO] at scala.tools.nsc.symtab.Types$class.lub(Types.scala:4943)
[INFO] at scala.tools.nsc.symtab.SymbolTable.lub(SymbolTable.scala:13)
[INFO] at scala.tools.nsc.symtab.Types$class.lub(Types.scala:4863)
[INFO] at scala.tools.nsc.symtab.SymbolTable.lub(SymbolTable.scala:13)
[INFO] at scala.tools.nsc.symtab.Types$class.solveOne$1(Types.scala:4675)
[INFO] at scala.tools.nsc.symtab.Types$$anonfun$solve$1.apply(Types.scala:4684)
[INFO] at scala.tools.nsc.symtab.Types$$anonfun$solve$1.apply(Types.scala:4683)
[INFO] at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:61)
[INFO] at scala.collection.immutable.List.foreach(List.scala:45)
[ERROR] error: fatal error (server aborted): Java heap space
[ERROR] one error found
我该如何解决这个问题?我不知道是什么导致了这个错误,也在谷歌上找不到任何信息,除了增加内存。