Getting error while analyzing PL/SQL Project

Must-share information (formatted with Markdown):
We are using SonarQube version 8.6.0.39681

We are trying to analyse one PL/SQL project in SonarQube. While analysis getting below error. Now sure how to fix this.

2021-01-20T06:40:13.0775891Z ##[error]Exception in thread "Report about progress of PL/SQL analyzer"
2021-01-20T06:40:13.0784141Z ##[error]java.lang.OutOfMemoryError: Java heap space
2021-01-20T06:40:13.0784701Z java.lang.OutOfMemoryError: Java heap space
2021-01-20T06:40:13.0785493Z ##[error]at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:419)
	at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:383)
2021-01-20T06:40:13.0786368Z 	at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:419)
2021-01-20T06:40:13.0786701Z 	at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:383)
2021-01-20T06:40:13.0787961Z ##[error]at ch.qos.logback.classic.Logger.info(Logger.java:579)
	at org.sonar.api.utils.log.LogbackLogger.doInfo(LogbackLogger.java:90)
	at org.sonar.api.utils.log.BaseLogger.info(BaseLogger.java:76)
	at com.sonar.oracle.N.B(Unknown Source)
	at com.sonar.oracle.N.run(Unknown Source)
	at java.base/java.lang.Thread.run(Thread.java:834)
2021-01-20T06:40:13.0788878Z 	at ch.qos.logback.classic.Logger.info(Logger.java:579)
2021-01-20T06:40:13.0789173Z 	at org.sonar.api.utils.log.LogbackLogger.doInfo(LogbackLogger.java:90)
2021-01-20T06:40:13.0789487Z 	at org.sonar.api.utils.log.BaseLogger.info(BaseLogger.java:76)
2021-01-20T06:40:13.0789725Z 	at com.sonar.oracle.N.B(Unknown Source)
2021-01-20T06:40:13.0789933Z 	at com.sonar.oracle.N.run(Unknown Source)
2021-01-20T06:40:13.0790156Z 	at java.base/java.lang.Thread.run(Thread.java:834)
2021-01-20T06:40:15.6987609Z INFO: ------------------------------------------------------------------------
2021-01-20T06:40:15.6988132Z INFO: EXECUTION FAILURE
2021-01-20T06:40:15.6988366Z INFO: ------------------------------------------------------------------------
2021-01-20T06:40:15.6990208Z INFO: Total time: 18:11.609s
2021-01-20T06:40:16.1823258Z INFO: Final Memory: 13M/57M
2021-01-20T06:40:16.1823837Z INFO: ------------------------------------------------------------------------
2021-01-20T06:40:16.1825124Z ##[error]ERROR: Error during SonarScanner execution
java.lang.OutOfMemoryError: Java heap space
2021-01-20T06:40:16.1827365Z ERROR: Error during SonarScanner execution
2021-01-20T06:40:16.1827765Z java.lang.OutOfMemoryError: Java heap space
2021-01-20T06:40:16.1829629Z ##[error]at C.D.A.D.B.B.<init>(Unknown Source)
	at C.D.A.D.D.U.A(Unknown Source)
	at C.D.A.D.D.A$_K.A(Unknown Source)
	at C.D.A.D.D.U.A(Unknown Source)
	at C.D.A.D.D.U.A(Unknown Source)
	at C.D.A.D.D.U.A(Unknown Source)
	at C.D.A.F.F.A(Unknown Source)
	at C.D.A.F.G.A(Unknown Source)
	at C.D.A.F.G.A(Unknown Source)
	at com.sonar.oracle.Q.A(Unknown Source)
	at com.sonar.oracle.G.B(Unknown Source)
	at com.sonar.oracle.I$_A.A(Unknown Source)
	at com.sonar.plsql.plugin.F.B(Unknown Source)
	at com.sonar.oracle.P.A(Unknown Source)
2021-01-20T06:40:16.1831935Z 	at C.D.A.D.B.B.<init>(Unknown Source)
2021-01-20T06:40:16.1832130Z 	at C.D.A.D.D.U.A(Unknown Source)
2021-01-20T06:40:16.1832306Z 	at C.D.A.D.D.A$_K.A(Unknown Source)
2021-01-20T06:40:16.1832491Z 	at C.D.A.D.D.U.A(Unknown Source)
2021-01-20T06:40:16.1832658Z 	at C.D.A.D.D.U.A(Unknown Source)
2021-01-20T06:40:16.1832824Z 	at C.D.A.D.D.U.A(Unknown Source)
2021-01-20T06:40:16.1833005Z 	at C.D.A.F.F.A(Unknown Source)
2021-01-20T06:40:16.1833167Z 	at C.D.A.F.G.A(Unknown Source)
2021-01-20T06:40:16.1833342Z 	at C.D.A.F.G.A(Unknown Source)
2021-01-20T06:40:16.1833522Z 	at com.sonar.oracle.Q.A(Unknown Source)
2021-01-20T06:40:16.1833706Z 	at com.sonar.oracle.G.B(Unknown Source)
2021-01-20T06:40:16.1833909Z 	at com.sonar.oracle.I$_A.A(Unknown Source)
2021-01-20T06:40:16.1834106Z 	at com.sonar.plsql.plugin.F.B(Unknown Source)
2021-01-20T06:40:16.1834315Z 	at com.sonar.oracle.P.A(Unknown Source)
2021-01-20T06:40:16.1837921Z ##[error]at com.sonar.oracle.R.A(Unknown Source)
	at com.sonar.oracle.R.A(Unknown Source)
	at com.sonar.plsql.plugin.H.execute(Unknown Source)
	at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:48)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:85)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:59)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor$$Lambda$975/0x0000000800982040.run(Unknown Source)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:77)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:59)
	at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:82)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:137)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123)
2021-01-20T06:40:16.1841292Z 	at com.sonar.oracle.R.A(Unknown Source)
2021-01-20T06:40:16.1841626Z 	at com.sonar.oracle.R.A(Unknown Source)
2021-01-20T06:40:16.1841972Z 	at com.sonar.plsql.plugin.H.execute(Unknown Source)
2021-01-20T06:40:16.1842410Z 	at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:48)
2021-01-20T06:40:16.1842996Z 	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:85)
2021-01-20T06:40:16.1843609Z 	at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:59)
2021-01-20T06:40:16.1844230Z 	at org.sonar.scanner.sensor.ModuleSensorsExecutor$$Lambda$975/0x0000000800982040.run(Unknown Source)
2021-01-20T06:40:16.1844831Z 	at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:77)
2021-01-20T06:40:16.1845516Z 	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:59)
2021-01-20T06:40:16.1846142Z 	at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:82)
2021-01-20T06:40:16.1846813Z 	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:137)
2021-01-20T06:40:16.1847440Z 	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123)
2021-01-20T06:40:16.1851325Z ##[error]at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:393)
	at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:389)
	at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:358)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:137)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123)
	at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:144)
ERROR: 
ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.
2021-01-20T06:40:16.1859017Z 	at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:393)
2021-01-20T06:40:16.1859796Z 	at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:389)
2021-01-20T06:40:16.1860186Z 	at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:358)
2021-01-20T06:40:16.1860552Z 	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:137)
2021-01-20T06:40:16.1860925Z 	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123)
2021-01-20T06:40:16.1861273Z 	at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:144)
2021-01-20T06:40:16.1861521Z ERROR: 
2021-01-20T06:40:16.1861717Z ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.
2021-01-20T06:40:16.3446676Z ##[error]The process 'E:\WKApps\_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\4.17.0\sonar-scanner\bin\sonar-scanner.bat' failed with exit code 1
2021-01-20T06:40:16.3541979Z ##[section]Finishing: Run Code Analysis

Hello

When analyzing SQL code you typically get OutOfMemoryError when a very large, auto-generated file (e.g. a script creating database and schema) is included in the analysis scope. So the first thing would be to check the scope of the analysis and make sure you exclude any auto-generated files. If after that you still face the same error - could you run the analysis in debug mode (by passing sonar.verbose=true parameter to the scanner) and attach a full zipped log produced by the scanner?

Best,
Michal

Hi Michal,

Thanks for replying. I will modify the scope and see if it works or not

Hi Michal,

We reduced the scope of analysis, however it is still failing with below error-

15:28:27.623 ERROR: Error during SonarScanner execution
java.lang.IllegalStateException: Report processing did not complete successfully: FAILED at org.sonar.plugins.buildbreaker.QualityGateBreaker.getAnalysisId(QualityGateBreaker.java:205) at org.sonar.plugins.buildbreaker.QualityGateBreaker.execute(QualityGateBreaker.java:266) at org.sonar.scanner.postjob.PostJobWrapper.execute(PostJobWrapper.java:49) at org.sonar.scanner.postjob.PostJobsExecutor.execute(PostJobsExecutor.java:48) at org.sonar.scanner.postjob.PostJobsExecutor.execute(PostJobsExecutor.java:39) at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:373) at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:137) at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123) at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:144) at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:137) at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123) at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:72) at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:66)
at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60) at com.sun.proxy.$Proxy0.execute(Unknown Source) at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189) at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138) at org.sonarsource.scanner.cli.Main.execute(Main.java:112) at org.sonarsource.scanner.cli.Main.execute(Main.java:75) at org.sonarsource.scanner.cli.Main.main(Main.java:61)
15:28:27.623 ERROR: 15:28:27.623 ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.
The process ‘E:\WKApps_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\4.17.0\sonar-scanner\bin\sonar-scanner.bat’ failed with exit code 1

Any help will be highly appreciated.

Regards,
Ashutosh

log.zip (3.7 MB)

Attaching the log file

Hello

This time the analysis finished successfully:

2021-01-20T15:27:06.9897360Z 15:27:06.987 INFO: ANALYSIS SUCCESSFUL, you can browse https://sonarqube.cchaxcess.com/dashboard?id=portaladdfiles&branch=2019Portal-5.0
2021-01-20T15:27:06.9897922Z 15:27:06.987 INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report

What failed was a post job Quality Gate Breaker:

2021-01-20T15:27:06.9898463Z 15:27:06.987 INFO: More about the report processing at https://sonarqube.cchaxcess.com/api/ce/task?id=AXcgaBBG0eKCBJeHyVsA
2021-01-20T15:27:06.9924868Z 15:27:06.987 DEBUG: Post-jobs : Forbidden Configuration Breaker -> Quality Gate Breaker
2021-01-20T15:27:06.9925628Z 15:27:06.987 INFO: Executing post-job 'Forbidden Configuration Breaker'
2021-01-20T15:27:06.9926176Z 15:27:06.987 INFO: Executing post-job 'Quality Gate Breaker'
...
2021-01-20T15:28:27.6329816Z ##[error]java.lang.IllegalStateException: Report processing did not complete successfully: FAILED
	at org.sonar.plugins.buildbreaker.QualityGateBreaker.getAnalysisId(QualityGateBreaker.java:205)
	at org.sonar.plugins.buildbreaker.QualityGateBreaker.execute(QualityGateBreaker.java:266)
	at org.sonar.scanner.postjob.PostJobWrapper.execute(PostJobWrapper.java:49)
	at org.sonar.scanner.postjob.PostJobsExecutor.execute(PostJobsExecutor.java:48)
	at org.sonar.scanner.postjob.PostJobsExecutor.execute(PostJobsExecutor.java:39)
	at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:373)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:137)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123)
	at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:144)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:137)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123)
	at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:72)
	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:66)

It seems that the report processing on the SonarQube side failed for some reason. You may check it on the Background Task page of this project. This post job is not provided by SonarSource, it might be that it fails because of the state of the Quality Gate of the project.

Michal

1 Like

Thanks a lot for your help Michal. We were able to analyze the project successfully.

Regards,
Ashutosh

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.