nuxeo 5.7 compilation error

When I run the command: mvn -DskipTests install -Paddons I get an error:

[INFO] Compiling 1 source file to D:\n57\n\nuxeo-features\nuxeo-platform-annotations\nuxeo-platform-annotations-web\target\test-classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] Failure executing javac, but could not parse the error:


The system is out of resources.
Consult the following stack trace for details.
java.lang.StackOverflowError
at com.sun.tools.javac.comp.Attr.litType(Attr.java:2855)
at com.sun.tools.javac.comp.Attr.visitLiteral(Attr.java:2848)
at com.sun.tools.javac.tree.JCTree$JCLiteral.accept(JCTree.java:1730)
at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:431)
at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:418)
at com.sun.tools.javac.comp.Attr.attribArgs(Attr.java:504)
at com.sun.tools.javac.comp.Attr.visitApply(Attr.java:1506)
at com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1321)
at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:431)
at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:418)
at com.sun.tools.javac.comp.Attr.visitSelect(Attr.java:2238)

I am using java 1.7.0.25 and settings “-Xms1g -Xmx1g -XX:MaxPermSize=256m” What should I change to eliminate the error ?

0 votes

1 answers

1216 views

ANSWER

but it is strange the following command is working properly:

mvn eclipse:clean eclipse:eclipse -Paddons,distrib,all-distributions -DdownloadSources=true -DdownloadJavadocs=true
06/30/2013

Normal, eclipse plugin computation is lighter than install that compile, package and install projects.

  • Did you try -XX:MaxPermSize=512m ?
  • Which version of maven are you using ?
07/01/2013

Yes, I have also tried -XX:MaxPermSize=512m with the same result. I am using:

Apache Maven 2.2.1 (r801777; 2009-08-06 21:16:01+0200)
Java version: 1.7.0_25
07/01/2013



Don't you have the full stack trace?

On Windows, it's easy to come out of resources since there are requirements for contiguous memory. You may try to compile right after boot, before running any other application which would fragment the memory.

The java.lang.StackOverflowError issue is often due to a thread stack size being greater than the JVM limit. Try to increase it with “-Xss” JVM option (“MAVEN_OPTS=-Xss1280k -Xmx...“).

http://www.oracle.com/technetwork/java/hotspotfaq-138619.html states:

In Java SE 6, the default on Sparc is 512k in the 32-bit VM, and 1024k in the 64-bit VM. On x86 Solaris/Linux it is 320k in the 32-bit VM and 1024k in the 64-bit VM.

On Windows, the default thread stack size is read from the binary (java.exe). As of Java SE 6, this value is 320k in the 32-bit VM and 1024k in the 64-bit VM.

You can reduce your stack size by running with the -Xss option. For example:

java -server -Xss64k

Note that on some versions of Windows, the OS may round up thread stack sizes using very coarse granularity. If the requested size is less than the default size by 1K or more, the stack size is rounded up to the default; otherwise, the stack size is rounded up to a multiple of 1 MB.

1 votes



Yes, it was this case. Finally, the build was finished sucessfully. I used the following parameters:

-Xms512m -Xmx512m -Xss64m -XX:MaxPermSize=128m

Thank you.

07/02/2013