1 Reply Latest reply on May 4, 2009 5:34 AM by Nick Belaevski

    mvn build richfaces, java.lang.OutOfMemoryError: Java heap s

    Dave Chen Master

      > mvn clean install

      java.lang.OutOfMemoryError: Java heap space
      at java.util.jar.Manifest$FastInputStream.(Manifest.java:300)
      at java.util.jar.Manifest$FastInputStream.(Manifest.java:295)
      at java.util.jar.Manifest.read(Manifest.java:163)
      at java.util.jar.Manifest.(Manifest.java:52)
      at java.util.jar.JarFile.getManifestFromReference(JarFile.java:163)
      at java.util.jar.JarFile.getManifest(JarFile.java:145)
      at sun.misc.URLClassPath$JarLoader$1.getManifest(URLClassPath.java:624)
      at java.net.URLClassLoader.defineClass(URLClassLoader.java:221)
      at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
      at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
      at org.codehaus.plexus.compiler.javac.IsolatedClassLoader.loadClass(IsolatedClassLoader.java:56)
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
      at com.sun.tools.javac.jvm.ClassReader.readCompoundAnnotation(ClassReader.java:934)
      at com.sun.tools.javac.jvm.ClassReader.attachAnnotations(ClassReader.java:886)
      at com.sun.tools.javac.jvm.ClassReader.readMemberAttr(ClassReader.java:783)
      at com.sun.tools.javac.jvm.ClassReader.readClassAttr(ClassReader.java:853)
      at com.sun.tools.javac.jvm.ClassReader.readClassAttrs(ClassReader.java:864)
      at com.sun.tools.javac.jvm.ClassReader.readClass(ClassReader.java:1294)
      at com.sun.tools.javac.jvm.ClassReader.readClassFile(ClassReader.java:1380)
      at com.sun.tools.javac.jvm.ClassReader.fillIn(ClassReader.java:1586)
      at com.sun.tools.javac.jvm.ClassReader.complete(ClassReader.java:1535)
      at com.sun.tools.javac.code.Symbol.complete(Symbol.java:355)
      at com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:612)
      at com.sun.tools.javac.jvm.ClassReader.loadClass(ClassReader.java:1635)
      at com.sun.tools.javac.comp.Resolve.loadClass(Resolve.java:815)
      at com.sun.tools.javac.comp.Resolve.findGlobalType(Resolve.java:874)
      at com.sun.tools.javac.comp.Resolve.findType(Resolve.java:934)
      at com.sun.tools.javac.comp.Resolve.findIdent(Resolve.java:959)
      at com.sun.tools.javac.comp.Resolve.resolveIdent(Resolve.java:1135)
      at com.sun.tools.javac.comp.Attr.visitIdent(Attr.java:1612)


      [INFO] ------------------------------------------------------------------------
      [INFO] For more information, run Maven with the -e switch
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 1 minute 30 seconds
      [INFO] Finished at: Mon May 04 10:59:08 CST 2009
      [INFO] Final Memory: 46M/63M
      [INFO] ------------------------------------------------------------------------

      I tried
      > mvn install -Dmaven_opts=-Xmx102

      same error.

      If I
      >set MAVEN_OPTS="-Xms256m -Xmx2048m -XX:MaxPermSize=256m"
      >mvn install
      Invalid initial heap size: -Xms256m -Xmx2048m -XX:MaxPermSize=256m
      Could not create the Java virtual machine.

      Thanks for help.
      Dave