
Software Composition Analysis Group (Archived) — indra.patel (Community Member) asked a question.
Hi,
While I am running a desktop agent based scan, after running a while, srcclr reports "com.sourceclear.agent.commands.ScanCommand ERROR Unable to scan and generate report: Java heap space".
I think increasing heap space via Jvm options to Maven (e.g. -Xms512m -Xmx3g -XX:MaxPermSize=1024m) might do the job.
How can I make srcclr use these JVM values when running mvn during the scan which is being done manually at present on Windows 2016 server Powershell window.?
I see srcclr using the following options in the debug output:
2020-09-23/15:04:37.798 com.sourceclear.engine.component.collectors.MavenNativeCollector INFO Running Maven with: C:\MAVEN\apache-maven-3.6.3-bin\apache-maven-3.6.3\bin\mvn.cmd compile -Dcheckstyle.skip=true -e -DskipTests -DskipITs -Dmaven.test.skip=true --fail-fast --nsu -Denforcer.skip=true com.srcclr:srcclr-maven-plugin:3.1.20:scan --batch-mode -DheadlessOutputFile=C:\Users\INDRA~1.PAT\AppData\Local\Temp\graph-1593005717018069188.json
I have spent multiple days searching the internet, and trying the other srcclr options such as compile_first, install_first, but nothing works. Help!
Thanks.
Indra.
.png)
I was able to overcome the issue by specifying the following before starting srcclr in the Powershell window.
$Env:JAVA_OPTS="-Xms8g -Xmx20g".