When running a class I have the following exception:
Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded
I've tried to increase the jvmArg heap size from inside maven pom.xml of the class package:
http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0
<parent>
(...)
</parent>
<artifactId>(...)</artifactId>
<name>(...)</name>
<properties>
<javaOpts.Xmx>4g</javaOpts.Xmx> <!-- default that can be adjusted on the command line with -DjavaOpts.Xmx=... -->
<(...).basedir>${project.basedir}/..</(...).basedir>
</properties>
<build>
<plugins>
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<configuration>
<launchers>
<launcher>
<id>MyClassName</id>
<mainClass>(...)</mainClass>
<jvmArgs>
<jvmArg>-Xmx${javaOpts.Xmx}</jvmArg>
(...)
I've tried the last cited line with many values:
<jvmArg>-Xmx512m{javaOpts.Xmx}</jvmArg>
<jvmArg>-Xmx4096M{javaOpts.Xmx}</jvmArg>
- ...
<jvmArg>-Xmx10000000000M{javaOpts.Xmx}</jvmArg>
But for all of them I have the same error.
Anyone can help me? Observation: I'm running from IntelliJ IDEA.