Skip navigation

Just saw a StackOverflowError in Javac.

Interesting fact is that it happens on Jenkins CI but not at my system, with the same JDK version on Linux.

 

[INFO] Compiling 40 source files to /mnt/hudson_workspace/workspace/Windup-daily/windup/rules-java-ee/target/classes


The system is out of resources.
Consult the following stack trace for details.
java.lang.StackOverflowError
at com.sun.tools.javac.code.Type$ClassType.accept(Type.java:583)
at com.sun.tools.javac.code.Types$UnaryVisitor.visit(Types.java:3803)
at com.sun.tools.javac.code.Types.supertype(Types.java:1750)
at com.sun.tools.javac.comp.Resolve.findField(Resolve.java:551)
at com.sun.tools.javac.comp.Resolve.findField(Resolve.java:553)
at com.sun.tools.javac.comp.Resolve.findField(Resolve.java:559)
at com.sun.tools.javac.comp.Resolve.findField(Resolve.java:553)
at com.sun.tools.javac.comp.Resolve.findVar(Resolve.java:602)
at com.sun.tools.javac.comp.Resolve.findIdent(Resolve.java:1196)
at com.sun.tools.javac.comp.Resolve.resolveIdent(Resolve.java:1396)
at com.sun.tools.javac.comp.Attr.visitIdent(Attr.java:2162)
at com.sun.tools.javac.tree.JCTree$JCIdent.accept(JCTree.java:1705)
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:2247)
at com.sun.tools.javac.tree.JCTree$JCFieldAccess.accept(JCTree.java:1677)
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:1513)

 

Turns out to be caused by different RHEL Javac defaults.

MAVEN_OPTS=-Xss1024k fixed it.

I specifically use the "Invoke top-level Maven goal" in Jenkins CI, so "-Xss1024k" goes to the "JVM Options" field.

Filter Blog

By date:
By tag: