OutOfMemoryError PermGen space when running Sonar Runner

(Pau Pachès) #1

I get an error when applying the Sonar Runner plugin in Gradle. Error message is OutOfMemoryError: PermGen space, apparently running PMD. How we can specify -XX:MaxPermSize=512M to the PMD process that’s ultimately started by SonarRunner. I’m using Java 6 due to project internal needs Another error I’m seeing: > java.lang.VerifyError: (class: org/picocontainer/PicoLifecycleException, method: getMessage signature: ()Ljava/lang/String; ) Illegal constant pool index

(Peter Niederwieser) #2

Currently, the Sonar Runner gets executed inside the Gradle JVM. (This will likely change in the future.) The best way to control memory settings for the Gradle JVM is via ‘org.gradle.jvmargs=…’ in ‘gradle.properties’.

(Pau Pachès) #3

Using what you suggest with the right hand side -XX:MaxPermSize=512M makes “gradle sonarRunner” run to completion. Thanks.

(x1000) #4

We use sonarRunner with a 64bit JVM (Win7 64bit) and the settings below (don’t remember where I got those from).

-Xmx16G -Xms4G