Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven compilation: Failure executing javac

Here is an exception we get when trying to compile a freshly checked out code under Windows Server 2003 with Maven 2.2.1 and JDK 1.6.0_23. Several machines running Ubuntu with the same Maven and JDK version have no problems at all compiling the exact same source.

Have tried providing alternative Maven options (i.e. MAVEN_OPTS=-Xms256m -Xmx1024m) to no avail.

What could be the cause of this problem and what would be a possible solution? Thanx.

[INFO] Compilation failure

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.visitSelect(Attr.java:1799)
    at com.sun.tools.javac.tree.JCTree$JCFieldAccess.accept(JCTree.java:1522)
    at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:360)
    at com.sun.tools.javac.comp.Attr.attribExpr(Attr.java:377)
    at com.sun.tools.javac.comp.Attr.visitApply(Attr.java:1241)
    at com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1210)
    at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:360)
   ... then trace repeats multiple times
like image 489
01es Avatar asked Jan 24 '11 13:01

01es


1 Answers

try

MAVEN_OPTS=-Xms256m -Xmx1024m -Xss1024k

Note: -Xss , should be set according to hardware available

like image 135
jmj Avatar answered Oct 07 '22 02:10

jmj