- Enterprise Edition Version 9.5 (build 56709)
- Findbugs 4.2.0 (Analyze Java, Scala, Closure and JSP code with SpotBugs. 4.7.1)
My Sonar build is getting failed with below error, I have already tried increasing the below config nut no luck.
sonar.ce.javaOpts=-Xmx4096m -Xms2048m -XX:+HeapDumpOnOutOfMemoryError -Djava.net.preferIPv4Stack=true
As per few KB articles I have also added below parameter to my pipeline but still see same issue.
export SONAR_SCANNER_OPTS=-4096m
Note: We use MAVEN to scan sonar and not sure if above parameter works with Maven.
06-Jul-2022 17:54:23 [INFO] BUILD FAILURE
06-Jul-2022 17:54:23 [INFO] ------------------------------------------------------------------------
06-Jul-2022 17:54:23 [INFO] Total time: 01:42 h
06-Jul-2022 17:54:23 [INFO] Finished at: 2022-07-06T17:54:23-04:00
06-Jul-2022 17:54:23 [INFO] Final Memory: 259M/920M
06-Jul-2022 17:54:23 [INFO] ------------------------------------------------------------------------
06-Jul-2022 17:54:23 [ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.1.2184:sonar (default-cli) on project v3-product: Can not execute Findbugs: java.lang.OutOfMemoryError: Java heap space: failed reallocation of scalar replaced objects -> [Help 1]
06-Jul-2022 17:54:23 [ERROR]
06-Jul-2022 17:54:23 [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
06-Jul-2022 17:54:23 [ERROR] Re-run Maven using the -X switch to enable full debug logging.
06-Jul-2022 17:54:23 [ERROR]
06-Jul-2022 17:54:23 [ERROR] For more information about the errors and possible solutions, please read the following articles:
Thanks,
Sunil Palugula