Error during SonarQube Scanner execution java.lang.OutOfMemoryError

Must-share information (formatted with Markdown):

  • SonarQube 7.3 and Scanner version: 4.7.0.2747

  • Seeing error during sonar scan.

17:00:15.609 ERROR: Unable to parse file: file:///workspace/source-dir/namq-cqp-wrp-webinterface/src/main/resources/static/vendor-es2015.js
17:00:15.609 ERROR: Parse error at line 171303 column 27:

171293: 
171294:         return new StreamHelper(result, outputType, "");
171295:     }
171296: 
171297:     /**
171298:      * Prepare the content in the asked type.
171299:      * @param {String} type the type of the result.
171300:      * @param {Function} onUpdate a function to call on each internal update.
171301:      * @return Promise the promise of the result.
171302:      */
171303:     async(type, onUpdate) {
                                  ^
171304:         return this.internalStream(type).accumulate(onUpdate);
171305:     }
171306: 
171307:     /**
171308:      * Return a worker for the compressed content.
171309:      * @private
171310:      * @param {Object} compression the compression object to use.
171311:      * @param {Object} compressionOptions the options to use when compressing.
171312:      * @return Worker the worker.
171313:      */

17:03:45.937 INFO: 26/53 files analyzed, current file: namq-cqp-wrp-webinterface/src/main/resources/static/vendor-es5.js
Exception in thread "JOURNAL_FLUSHER" java.lang.OutOfMemoryError: Java heap space
	at java.base/java.lang.Long.valueOf(Long.java:1180)
	at com.persistit.JournalManager$JournalFlusher.runTask(JournalManager.java:2402)
	at com.persistit.IOTaskRunnable.run(IOTaskRunnable.java:144)
	at java.base/java.lang.Thread.run(Thread.java:829)
17:03:50.253 INFO: ------------------------------------------------------------------------
17:03:50.253 INFO: EXECUTION FAILURE
17:03:50.253 INFO: ------------------------------------------------------------------------
17:03:50.253 INFO: Total time: 4:41.547s
17:03:50.354 INFO: Final Memory: 84M/1820M
17:03:50.354 INFO: ------------------------------------------------------------------------
17:03:50.354 ERROR: Error during SonarScanner execution
java.lang.OutOfMemoryError: Java heap space
	at java.base/java.util.Arrays.copyOf(Arrays.java:3689)
	at java.base/java.util.ArrayList.toArray(ArrayList.java:401)

Hi,

Your version is past EOL. You should upgrade to either the latest version or the current LTS at your earliest convenience. Your upgrade path is:

7.3 → 7.9.6 → 8.9.8 → 9.5 (last step optional)

You may find the Upgrade Guide and the LTS-to-LTS Upgrade Notes helpful. If you have questions about upgrading, feel free to open a new thread for that here.

If your error persists after upgrade, please come back to us.

 
HTH,
Ann