java.lang.OutOfMemoryError: Java heap space

GitHub | jackalsin | 11 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    mac下 heap Size

    GitHub | 11 months ago | jackalsin
    java.lang.OutOfMemoryError: Java heap space
  2. 0

    Memory overflow Java

    Stack Overflow | 3 years ago | Francesco Marra
    java.lang.OutOfMemoryError: Java heap space
  3. 0

    Java OutOfMemoryError when VM is set to 1024m max

    Stack Overflow | 5 years ago | hooby3dfx
    java.lang.OutOfMemoryError: Java heap space
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    [scala-user] Scala 2.9.2 Compiler strange behavior - Grokbase

    grokbase.com | 1 year ago
    java.lang.OutOfMemoryError: Java heap space at scala.tools.nsc.symtab.Types$**TypeRef$.apply(Types.scala:**2031) at scala.tools.nsc.symtab.Types$**class.copyTypeRef(Types.scala:**2781) at scala.tools.nsc.symtab.**SymbolTable.copyTypeRef(** SymbolTable.scala:13) at scala.tools.nsc.symtab.Types$**TypeMap.mapOver(Types.scala:**3122) at scala.tools.nsc.symtab.Types$**SubstMap.apply(Types.scala:**3567) at scala.tools.nsc.symtab.Types$**SubstMap.apply(Types.scala:**3532) at scala.tools.nsc.symtab.Types$**TypeMap$$anonfun$mapOverArgs$** 1.apply(Types.scala:3216) at scala.tools.nsc.symtab.Types$**TypeMap$$anonfun$mapOverArgs$** 1.apply(Types.scala:3212) at scala.tools.nsc.symtab.Types$**class.map2Conserve(Types.**scala:4985) at scala.tools.nsc.symtab.**SymbolTable.map2Conserve(** SymbolTable.scala:13) at scala.tools.nsc.symtab.Types$**TypeMap.mapOverArgs(Types.**scala:3212) at scala.tools.nsc.symtab.Types$**TypeMap.mapOver(Types.scala:**3119) at scala.tools.nsc.symtab.Types$**SubstMap.apply(Types.scala:**3567) at scala.tools.nsc.symtab.Types$**SubstMap.apply(Types.scala:**3532) at scala.collection.immutable.**List.loop$1(List.scala:148) at scala.collection.immutable.**List.mapConserve(List.scala:**164) at scala.tools.nsc.symtab.Types$**TypeMap.mapOver(Types.scala:**3168) at scala.tools.nsc.symtab.Types$**SubstMap.apply(Types.scala:**3567) at scala.tools.nsc.symtab.Types$**Type.subst(Types.scala:583) at scala.tools.nsc.symtab.Types$**Type.instantiateTypeParams(** Types.scala:423) at scala.tools.nsc.symtab.Types$**TypeRef.transform(Types.scala:**1731) at scala.tools.nsc.symtab.Types$**TypeRef$$anonfun$baseTypeSeq$** 5.apply(Types.scala:1943) at scala.tools.nsc.symtab.Types$**TypeRef$$anonfun$baseTypeSeq$** 5.apply(Types.scala:1943) at scala.tools.nsc.symtab.**BaseTypeSeqs$BaseTypeSeq.map(** BaseTypeSeqs.scala:113) at scala.tools.nsc.symtab.Types$**TypeRef.baseTypeSeq(Types.**scala:1943) at scala.tools.nsc.symtab.**BaseTypeSeqs$$anonfun$** compoundBaseTypeSeq$1.apply(**BaseTypeSeqs.scala:200) at scala.tools.nsc.symtab.**BaseTypeSeqs$$anonfun$** compoundBaseTypeSeq$1.apply(**BaseTypeSeqs.scala:198) at scala.collection.**LinearSeqOptimized$class.** foreach(LinearSeqOptimized.**scala:59) at scala.collection.immutable.**List.foreach(List.scala:76) at scala.tools.nsc.symtab.**BaseTypeSeqs$class.**compoundBaseTypeSeq(** BaseTypeSeqs.scala:198) at scala.tools.nsc.symtab.**SymbolTable.**compoundBaseTypeSeq(** SymbolTable.scala:13) at scala.tools.nsc.symtab.Types$**CompoundType$$anonfun$** baseTypeSeq$3.apply(Types.**scala:1291) Also I tried to compile this code (using maven). The situation is the same. A lot of time to compile and huge memory consumption (I tried to increase -Xmx with no luck). To measure the REPL interpretation time I saved the code snippet to file and passed it to the REPL like this: $ pwd /home/andrey/Downloads/scala-**2.9.2/bin $ time ./scala ~/Dropbox/test_partials.scala The result is also an error but different this time: java.lang.**NoClassDefFoundError: scala/runtime/** AbstractPartialFunction$mcVL$**sp at java.lang.ClassLoader.**defineClass1(Native Method) at java.lang.ClassLoader.**defineClassCond(ClassLoader.**java:631) at java.lang.ClassLoader.**defineClass(ClassLoader.java:**615) at java.security.**SecureClassLoader.defineClass(** SecureClassLoader.java:141) at java.net.URLClassLoader.**defineClass(URLClassLoader.**java:283) at java.net.URLClassLoader.**access$000(URLClassLoader.**java:58) at java.net.URLClassLoader$1.run(**URLClassLoader.java:197) at java.security.**AccessController.doPrivileged(**Native Method) at java.net.URLClassLoader.**findClass(URLClassLoader.java:**190) at scala.tools.nsc.util.**ScalaClassLoader$**URLClassLoader.scala$tools$* *nsc$util$ScalaClassLoader$$**super$findClass(** ScalaClassLoader.scala:88) at scala.tools.nsc.util.**ScalaClassLoader$class.** findClass(ScalaClassLoader.**scala:44) at scala.tools.nsc.util.**ScalaClassLoader$**URLClassLoader.findClass(** ScalaClassLoader.scala:88) at java.lang.ClassLoader.**loadClass(ClassLoader.java:**306) at scala.tools.nsc.util.**ScalaClassLoader$**URLClassLoader.scala$tools$* *nsc$util$ScalaClassLoader$$**super$loadClass(** ScalaClassLoader.scala:88) at scala.tools.nsc.util.**ScalaClassLoader$class.** loadClass(ScalaClassLoader.**scala:50) at scala.tools.nsc.util.**ScalaClassLoader$**URLClassLoader.loadClass(** ScalaClassLoader.scala:88) at java.lang.ClassLoader.**loadClass(ClassLoader.java:**247) at Main$$anon$1.<init>(test_**partials.scala:27) at Main$.main(test_partials.**scala:1)

    Root Cause Analysis

    1. java.lang.OutOfMemoryError

      Java heap space

      at com.hankcs.hanlp.dictionary.CoreDictionary.loadDat()
    2. com.hankcs.hanlp
      HanLP.segment
      1. com.hankcs.hanlp.dictionary.CoreDictionary.loadDat(CoreDictionary.java:141)
      2. com.hankcs.hanlp.dictionary.CoreDictionary.load(CoreDictionary.java:63)
      3. com.hankcs.hanlp.dictionary.CoreDictionary.<clinit>(CoreDictionary.java:40)
      4. com.hankcs.hanlp.seg.common.Vertex.<clinit>(Vertex.java:56)
      5. com.hankcs.hanlp.seg.common.WordNet.<init>(WordNet.java:71)
      6. com.hankcs.hanlp.seg.Viterbi.ViterbiSegment.segSentence(ViterbiSegment.java:40)
      7. com.hankcs.hanlp.seg.Segment.seg(Segment.java:441)
      8. com.hankcs.hanlp.tokenizer.StandardTokenizer.segment(StandardTokenizer.java:50)
      9. com.hankcs.hanlp.HanLP.segment(HanLP.java:386)
      9 frames
    3. Unknown
      Main.main
      1. Main.main(Main.java:30)
      1 frame