OutOfMemoryError when building project with jmh-generator-annprocess dependency

Meng, David dmeng at netsuite.com
Wed Sep 27 22:52:38 UTC 2017


<html><bodyI am trying to build a project via gradle and I've specified the following dependencies:

testCompile ('org.apache.commons:commons-math3:3.6.1',
'org.openjdk.jmh:jmh-core:1.19',
'org.openjdk.jmh:jmh-generator-annprocess:1.19')

Here is the gradle command I ran:
gradlew --profile --project-dir /webdev/<project_dir> <task> -Dorg.gradle.jvmargs=-Xmx2048m

I would get the following compilation error:

The system is out of resources.
Consult the following stack trace for details.
java.lang.OutOfMemoryError: Java heap space
        at com.sun.tools.javac.code.Scope.dble(Scope.java:173)
        at com.sun.tools.javac.code.Scope.enter(Scope.java:213)
        at com.sun.tools.javac.comp.MemberEnter$2.importFrom(MemberEnter.java:229)
        at com.sun.tools.javac.comp.MemberEnter$2.importFrom(MemberEnter.java:220)
        at com.sun.tools.javac.comp.MemberEnter$2.run(MemberEnter.java:234)
        at com.sun.tools.javac.comp.Annotate.flush(Annotate.java:143)
        at com.sun.tools.javac.comp.Annotate.enterDone(Annotate.java:129)
        at com.sun.tools.javac.comp.Enter.complete(Enter.java:512)
        at com.sun.tools.javac.comp.Enter.main(Enter.java:471)
        at com.sun.tools.javac.main.JavaCompiler.enterTrees(JavaCompiler.java:982)
        at com.sun.tools.javac.main.JavaCompiler.enterTreesIfNeeded(JavaCompiler.java:965)
        at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1242)
        at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1170)
        at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:856)
        at com.sun.tools.javac.main.Main.compile(Main.java:523)
        at com.sun.tools.javac.main.Main.compile(Main.java:381)
        at com.sun.tools.javac.main.Main.compile(Main.java:370)
        at com.sun.tools.javac.main.Main.compile(Main.java:361)
        at com.sun.tools.javac.Main.compile(Main.java:56)
        at com.sun.tools.javac.Main.main(Main.java:42)

I've tried increasing the memory allocation via the following arguments: '-Xmx4096m -Xms4096m -Xss4096m'

Do you know what might be the cause of the OOM error?


NOTICE: This email and any attachments may contain confidential and proprietary information of NetSuite Inc. and is for the sole use of the intended recipient for the stated purpose. Any improper use or distribution is prohibited. If you are not the intended recipient, please notify the sender; do not review, copy or distribute; and promptly delete or destroy all transmitted information. Please note that all communications and information transmitted through this email system may be monitored by NetSuite or its agents and that all incoming email is automatically scanned by a third party spam and filtering service

</body></html>


More information about the jmh-dev mailing list