0

While doing maven build I am receiving following error. Does anybody know how to resolve it?

Exception in thread "main" Exception in thread "Thread-1" Exception in thread "Thread-7" Exception in thread "Thread-3" Exception in thread "Thread-4" Exception in thread "Thread-2" Exception in thread "Thread-5" Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "main" Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Thread-1" Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Thread-7" Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Thread-3" Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Thread-4" Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Thread-2" Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Thread-5"

 Results :

    Tests run: 100, Failures: 0, Errors: 0, Skipped: 0

    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ---------------------------------------------------------------------
    [INFO] Total time: 01:14 min
    [INFO] Finished at: 2018-02-11T00:12:46+01:00
    [INFO] Final Memory: 87M/704M
    [INFO] ---------------------------------------------------------------------
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project coba.zaa.engine.workflow: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test failed: The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
    [ERROR] Command was cmd.exe /X /C "C:\xxxxx\Tools\Release2\JDK\jdk_1.7.0.80_x64\jre\bin\java -jar C:\vvv\ZAA\nnnn\mmmmmm\target\surefire\surefirebooter1494547892126715647.jar C:\vvv\ZAA\nnnn\mmmmmm\\target\surefire\surefire2662483945733244110tmp C:\vvv\ZAA\nnnn\mmmmmm\target\surefire\surefire_05005140060060096785tmp"
    [ERROR] -> [Help 1]
    [ERROR] 
    http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
Narayan Yerrabachu
  • 1,714
  • 1
  • 19
  • 31
  • finally its working with this solution: org.apache.maven.plugins maven-surefire-plugin ${maven-surefire-plugin.version} true true -XX:MaxPermSize=500M – Narayan Yerrabachu Feb 11 '18 at 20:22

1 Answers1

1

Sounds like the memory settings in the JVM that the surefire plugin forks. These aren't inherited from the main MAVEN_OPTS, so need to be set directly in the pom.xml:

<build>
    <plugins>
        <plugin>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
                <argLine>-Xmx2g</argLine>
            </configuration>
        </plugin>
    </plugins>
</build>
df778899
  • 10,703
  • 1
  • 24
  • 36