Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
430 views
in Technique[技术] by (71.8m points)

java - 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
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

try

MAVEN_OPTS=-Xms256m -Xmx1024m -Xss1024k

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...