gretard / sonar-sql-plugin

SQL language (T-SQL, MySQL, Snowflake, Vertica and PostgreSQL dialects) plugin for SonarQube
GNU General Public License v3.0
78 stars 21 forks source link

Execution failure with the plugin enabled #1

Closed olsh closed 5 years ago

olsh commented 5 years ago

When I enable the plugin, the DB project analysis fails with the following log:

[19:13:13][Step 5/5] INFO: ------------------------------------------------------------------------
[19:13:13][Step 5/5] INFO: EXECUTION FAILURE
[19:13:13][Step 5/5] INFO: ------------------------------------------------------------------------
[19:13:13][Step 5/5] INFO: Total time: 45:17.320s
[19:15:06][Step 5/5] INFO: Final Memory: 1194M/3448M
[19:15:06][Step 5/5] INFO: ------------------------------------------------------------------------
[19:15:07][Step 5/5] ERROR: Error during SonarQube Scanner execution
[19:15:07][Step 5/5] ERROR: null
[19:15:07][Step 5/5] ERROR: 
[19:15:08][Step 5/5] The SonarQube Scanner did not complete successfully
[19:15:08][Step 5/5] 12:15:08.888  Post-processing failed. Exit code: 1
[19:15:09][Step 5/5] Process exited with code 1
[19:15:09][Step 5/5] Process exited with code 1 (Step: SonarScanner for MSBuild: finish analysis)
[19:15:10][Step 5/5] Step SonarScanner for MSBuild: finish analysis failed

I've tried to disable SQLCodeGuard analysis, this doesn't help.

We have a pretty large DB T-SQL project, so the analysis takes ~1 hour. The previous plugin https://github.com/gretard/sonar-tsql-plugin works without errors.

gretard commented 5 years ago

Hi,

Could you provide full log and/on run with debug enabled -X option? As it is a bit unclear where it failed..

Greta

On Wed, 10 Jul 2019, 11:00 Oleg Shevchenko, notifications@github.com wrote:

When I enable the plugin, the DB project analysis fails with the following log:

[19:13:13][Step 5/5] INFO: ------------------------------------------------------------------------ [19:13:13][Step 5/5] INFO: EXECUTION FAILURE [19:13:13][Step 5/5] INFO: ------------------------------------------------------------------------ [19:13:13][Step 5/5] INFO: Total time: 45:17.320s [19:15:06][Step 5/5] INFO: Final Memory: 1194M/3448M [19:15:06][Step 5/5] INFO: ------------------------------------------------------------------------ [19:15:07][Step 5/5] ERROR: Error during SonarQube Scanner execution [19:15:07][Step 5/5] ERROR: null [19:15:07][Step 5/5] ERROR: [19:15:08][Step 5/5] The SonarQube Scanner did not complete successfully [19:15:08][Step 5/5] 12:15:08.888 Post-processing failed. Exit code: 1 [19:15:09][Step 5/5] Process exited with code 1 [19:15:09][Step 5/5] Process exited with code 1 (Step: SonarScanner for MSBuild: finish analysis) [19:15:10][Step 5/5] Step SonarScanner for MSBuild: finish analysis failed

I've tried to disable SQLCodeGuard analysis, this doesn't help.

We have a pretty large DB T-SQL project, so the analysis takes ~1 hour. The previous plugin https://github.com/gretard/sonar-tsql-plugin works without errors.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/gretard/sonar-sql-plugin/issues/1?email_source=notifications&email_token=AE3VN7A4VHXLQMWJN72VHS3P6WJLJA5CNFSM4H7MSJ52YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G6JBFTA, or mute the thread https://github.com/notifications/unsubscribe-auth/AE3VN7BY5L27B7RID4IHZZ3P6WJLJANCNFSM4H7MSJ5Q .

olsh commented 5 years ago

Hi @gretard This is very strange when I enable detailed logging the analysis passed. Also, I've noticed another issue in logs when SQLCodeGuard is enabled

[17:12:40] :     [Step 5/5] INFO: Sensor org.sonar.plugins.sql.sensors.SQLSensor [sql]
[17:16:35] :     [Step 5/5] INFO: Sensor org.sonar.plugins.sql.sensors.SQLSensor [sql] (done) | time=234360ms
[17:16:35] :     [Step 5/5] INFO: Sensor org.sonar.plugins.sql.sensors.MSIssuesSensor [sql]
[17:16:35] :     [Step 5/5] INFO: Sensor org.sonar.plugins.sql.sensors.MSIssuesSensor [sql] (done) | time=123ms
[17:16:35] :     [Step 5/5] INFO: Sensor org.sonar.plugins.sql.sensors.CGIssuesSensor [sql]
[17:16:35] :     [Step 5/5] Use of SQL Code Guard is subject to the terms described in License.rtf
[17:16:35] :     [Step 5/5] [2019-07-10 10:16:35.391][000][INF]Starting
[17:16:43] :     [Step 5/5] [2019-07-10 10:16:43.318][7926][INF]500 file(s) processed
[17:16:51] :     [Step 5/5] [2019-07-10 10:16:51.092][7773][INF]1000 file(s) processed
[17:16:57] :     [Step 5/5] [2019-07-10 10:16:57.424][6332][INF]1500 file(s) processed
[17:17:03] :     [Step 5/5] [2019-07-10 10:17:03.113][5689][INF]2000 file(s) processed
[17:17:05] :     [Step 5/5] [2019-07-10 10:17:05.750][2636][INF]2500 file(s) processed
[17:17:09] :     [Step 5/5] [2019-07-10 10:17:09.809][4059][INF]3000 file(s) processed
[17:17:18] :     [Step 5/5] [2019-07-10 10:17:18.736][8926][INF]3500 file(s) processed
[17:17:22] :     [Step 5/5] [2019-07-10 10:17:22.348][3612][INF]Completed. 3887 file(s) processed, found 29282 issues
[17:17:22] :     [Step 5/5] [2019-07-10 10:17:22.348][000][INF]Finished
[17:17:22] :     [Step 5/5] WARN: Unexpected error
[17:17:22] :     [Step 5/5] javax.xml.bind.UnmarshalException: null
[17:17:22] :     [Step 5/5]     at javax.xml.bind.helpers.AbstractUnmarshallerImpl.createUnmarshalException(AbstractUnmarshallerImpl.java:335)
[17:17:22] :     [Step 5/5]     at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.createUnmarshalException(UnmarshallerImpl.java:563)
[17:17:22] :     [Step 5/5]     at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:249)
[17:17:22] :     [Step 5/5]     at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:214)
[17:17:22] :     [Step 5/5]     at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:157)
[17:17:22] :     [Step 5/5]     at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:204)
[17:17:22] :     [Step 5/5]     at org.sonar.plugins.sql.sensors.CGIssuesSensor.read(CGIssuesSensor.java:55)
[17:17:22] :     [Step 5/5]     at org.sonar.plugins.sql.sensors.CGIssuesSensor.execute(CGIssuesSensor.java:85)
[17:17:22] :     [Step 5/5]     at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:48)
[17:17:22] :     [Step 5/5]     at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:85)
[17:17:22] :     [Step 5/5]     at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:59)
[17:17:22] :     [Step 5/5]     at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:77)
[17:17:22] :     [Step 5/5]     at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:59)
[17:17:22] :     [Step 5/5]     at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:82)
[17:17:22] :     [Step 5/5]     at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
[17:17:22] :     [Step 5/5]     at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
[17:17:22] :     [Step 5/5]     at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:400)
[17:17:22] :     [Step 5/5]     at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:395)
[17:17:22] :     [Step 5/5]     at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:392)
[17:17:22] :     [Step 5/5]     at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:358)
[17:17:22] :     [Step 5/5]     at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
[17:17:22] :     [Step 5/5]     at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
[17:17:22] :     [Step 5/5]     at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:141)
[17:17:22] :     [Step 5/5]     at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
[17:17:22] :     [Step 5/5]     at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
[17:17:22] :     [Step 5/5]     at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:73)
[17:17:22] :     [Step 5/5]     at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67)
[17:17:22] :     [Step 5/5]     at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
[17:17:22] :     [Step 5/5]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[17:17:22] :     [Step 5/5]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[17:17:22] :     [Step 5/5]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[17:17:22] :     [Step 5/5]     at java.lang.reflect.Method.invoke(Method.java:498)
[17:17:22] :     [Step 5/5]     at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
[17:17:22] :     [Step 5/5]     at com.sun.proxy.$Proxy0.execute(Unknown Source)
[17:17:22] :     [Step 5/5]     at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:185)
[17:17:22] :     [Step 5/5]     at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:137)
[17:17:22] :     [Step 5/5]     at org.sonarsource.scanner.cli.Main.execute(Main.java:111)
[17:17:22] :     [Step 5/5]     at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
[17:17:22] :     [Step 5/5]     at org.sonarsource.scanner.cli.Main.main(Main.java:61)
[17:17:22] :     [Step 5/5] Caused by: org.xml.sax.SAXParseException: The value of attribute "info" associated with an element type "issue" must not contain the '<' character.
[17:17:22] :     [Step 5/5]     at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)
[17:17:22] :     [Step 5/5]     at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177)
[17:17:22] :     [Step 5/5]     at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:400)
[17:17:22] :     [Step 5/5]     at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
[17:17:22] :     [Step 5/5]     at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1472)
[17:17:22] :     [Step 5/5]     at com.sun.org.apache.xerces.internal.impl.XMLScanner.scanAttributeValue(XMLScanner.java:944)
[17:17:22] :     [Step 5/5]     at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanAttribute(XMLNSDocumentScannerImpl.java:447)
[17:17:22] :     [Step 5/5]     at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:250)
[17:17:22] :     [Step 5/5]     at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2784)
[17:17:22] :     [Step 5/5]     at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)
[17:17:22] :     [Step 5/5]     at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)
[17:17:22] :     [Step 5/5]     at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)
[17:17:22] :     [Step 5/5]     at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:842)
[17:17:22] :     [Step 5/5]     at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:771)
[17:17:22] :     [Step 5/5]     at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
[17:17:22] :     [Step 5/5]     at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
[17:17:22] :     [Step 5/5]     at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)
[17:17:22] :     [Step 5/5]     at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:243)
[17:17:22] :     [Step 5/5]     ... 36 common frames omitted
[17:17:22] :     [Step 5/5] 
[17:17:22] :     [Step 5/5] INFO: Sensor org.sonar.plugins.sql.sensors.CGIssuesSensor [sql] (done) | time=47571ms
[17:17:22] :     [Step 5/5] INFO: Sensor org.sonar.plugins.sql.sensors.SqlCoverCoverageSensor [sql]
[17:17:23] :     [Step 5/5] INFO: Sensor org.sonar.plugins.sql.sensors.SqlCoverCoverageSensor [sql] (done) | time=122ms
[17:17:23] :     [Step 5/5] INFO: Sensor org.sonar.plugins.sql.sensors.SqlCheckSensor [sql]
[17:17:23] :     [Step 5/5] INFO: Skip running external tool as executable not found /usr/bin/sqlcheck
[17:17:23] :     [Step 5/5] INFO: Sensor org.sonar.plugins.sql.sensors.SqlCheckSensor [sql] (done) | time=0ms

I've also tried to disable MS analysis, but still nothing. So, the build only passes when I enable detailed logs :) But the detailed log feature produced ~3Gb log file and takes 3x longer to build.

gretard commented 5 years ago

Hi,

Thank you for the log, will try to reproduce this. Which version of SQL code guard do you use?

On Wed, 10 Jul 2019, 17:42 Oleg Shevchenko, notifications@github.com wrote:

Hi @gretard https://github.com/gretard This is very strange when I enable detailed logging the analysis passed. Also, I've noticed another issue in logs when SQLCodeGuard is enabled

[17:12:40] : [Step 5/5] INFO: Sensor org.sonar.plugins.sql.sensors.SQLSensor [sql] [17:16:35] : [Step 5/5] INFO: Sensor org.sonar.plugins.sql.sensors.SQLSensor [sql] (done) | time=234360ms [17:16:35] : [Step 5/5] INFO: Sensor org.sonar.plugins.sql.sensors.MSIssuesSensor [sql] [17:16:35] : [Step 5/5] INFO: Sensor org.sonar.plugins.sql.sensors.MSIssuesSensor [sql] (done) | time=123ms [17:16:35] : [Step 5/5] INFO: Sensor org.sonar.plugins.sql.sensors.CGIssuesSensor [sql] [17:16:35] : [Step 5/5] Use of SQL Code Guard is subject to the terms described in License.rtf [17:16:35] : [Step 5/5] [2019-07-10 10:16:35.391][000][INF]Starting [17:16:43] : [Step 5/5] [2019-07-10 10:16:43.318][7926][INF]500 file(s) processed [17:16:51] : [Step 5/5] [2019-07-10 10:16:51.092][7773][INF]1000 file(s) processed [17:16:57] : [Step 5/5] [2019-07-10 10:16:57.424][6332][INF]1500 file(s) processed [17:17:03] : [Step 5/5] [2019-07-10 10:17:03.113][5689][INF]2000 file(s) processed [17:17:05] : [Step 5/5] [2019-07-10 10:17:05.750][2636][INF]2500 file(s) processed [17:17:09] : [Step 5/5] [2019-07-10 10:17:09.809][4059][INF]3000 file(s) processed [17:17:18] : [Step 5/5] [2019-07-10 10:17:18.736][8926][INF]3500 file(s) processed [17:17:22] : [Step 5/5] [2019-07-10 10:17:22.348][3612][INF]Completed. 3887 file(s) processed, found 29282 issues [17:17:22] : [Step 5/5] [2019-07-10 10:17:22.348][000][INF]Finished [17:17:22] : [Step 5/5] WARN: Unexpected error [17:17:22] : [Step 5/5] javax.xml.bind.UnmarshalException: null [17:17:22] : [Step 5/5] at javax.xml.bind.helpers.AbstractUnmarshallerImpl.createUnmarshalException(AbstractUnmarshallerImpl.java:335) [17:17:22] : [Step 5/5] at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.createUnmarshalException(UnmarshallerImpl.java:563) [17:17:22] : [Step 5/5] at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:249) [17:17:22] : [Step 5/5] at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:214) [17:17:22] : [Step 5/5] at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:157) [17:17:22] : [Step 5/5] at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:204) [17:17:22] : [Step 5/5] at org.sonar.plugins.sql.sensors.CGIssuesSensor.read(CGIssuesSensor.java:55) [17:17:22] : [Step 5/5] at org.sonar.plugins.sql.sensors.CGIssuesSensor.execute(CGIssuesSensor.java:85) [17:17:22] : [Step 5/5] at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:48) [17:17:22] : [Step 5/5] at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:85) [17:17:22] : [Step 5/5] at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:59) [17:17:22] : [Step 5/5] at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:77) [17:17:22] : [Step 5/5] at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:59) [17:17:22] : [Step 5/5] at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:82) [17:17:22] : [Step 5/5] at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136) [17:17:22] : [Step 5/5] at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122) [17:17:22] : [Step 5/5] at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:400) [17:17:22] : [Step 5/5] at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:395) [17:17:22] : [Step 5/5] at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:392) [17:17:22] : [Step 5/5] at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:358) [17:17:22] : [Step 5/5] at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136) [17:17:22] : [Step 5/5] at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122) [17:17:22] : [Step 5/5] at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:141) [17:17:22] : [Step 5/5] at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136) [17:17:22] : [Step 5/5] at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122) [17:17:22] : [Step 5/5] at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:73) [17:17:22] : [Step 5/5] at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67) [17:17:22] : [Step 5/5] at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46) [17:17:22] : [Step 5/5] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [17:17:22] : [Step 5/5] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [17:17:22] : [Step 5/5] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [17:17:22] : [Step 5/5] at java.lang.reflect.Method.invoke(Method.java:498) [17:17:22] : [Step 5/5] at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60) [17:17:22] : [Step 5/5] at com.sun.proxy.$Proxy0.execute(Unknown Source) [17:17:22] : [Step 5/5] at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:185) [17:17:22] : [Step 5/5] at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:137) [17:17:22] : [Step 5/5] at org.sonarsource.scanner.cli.Main.execute(Main.java:111) [17:17:22] : [Step 5/5] at org.sonarsource.scanner.cli.Main.execute(Main.java:75) [17:17:22] : [Step 5/5] at org.sonarsource.scanner.cli.Main.main(Main.java:61) [17:17:22] : [Step 5/5] Caused by: org.xml.sax.SAXParseException: The value of attribute "info" associated with an element type "issue" must not contain the '<' character. [17:17:22] : [Step 5/5] at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203) [17:17:22] : [Step 5/5] at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177) [17:17:22] : [Step 5/5] at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:400) [17:17:22] : [Step 5/5] at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327) [17:17:22] : [Step 5/5] at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1472) [17:17:22] : [Step 5/5] at com.sun.org.apache.xerces.internal.impl.XMLScanner.scanAttributeValue(XMLScanner.java:944) [17:17:22] : [Step 5/5] at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanAttribute(XMLNSDocumentScannerImpl.java:447) [17:17:22] : [Step 5/5] at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:250) [17:17:22] : [Step 5/5] at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2784) [17:17:22] : [Step 5/5] at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602) [17:17:22] : [Step 5/5] at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112) [17:17:22] : [Step 5/5] at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505) [17:17:22] : [Step 5/5] at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:842) [17:17:22] : [Step 5/5] at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:771) [17:17:22] : [Step 5/5] at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141) [17:17:22] : [Step 5/5] at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213) [17:17:22] : [Step 5/5] at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643) [17:17:22] : [Step 5/5] at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:243) [17:17:22] : [Step 5/5] ... 36 common frames omitted [17:17:22] : [Step 5/5] [17:17:22] : [Step 5/5] INFO: Sensor org.sonar.plugins.sql.sensors.CGIssuesSensor [sql] (done) | time=47571ms [17:17:22] : [Step 5/5] INFO: Sensor org.sonar.plugins.sql.sensors.SqlCoverCoverageSensor [sql] [17:17:23] : [Step 5/5] INFO: Sensor org.sonar.plugins.sql.sensors.SqlCoverCoverageSensor [sql] (done) | time=122ms [17:17:23] : [Step 5/5] INFO: Sensor org.sonar.plugins.sql.sensors.SqlCheckSensor [sql] [17:17:23] : [Step 5/5] INFO: Skip running external tool as executable not found /usr/bin/sqlcheck [17:17:23] : [Step 5/5] INFO: Sensor org.sonar.plugins.sql.sensors.SqlCheckSensor [sql] (done) | time=0ms

I've also tried to disable MS analysis, but still nothing. So, the build only passes when I enable detailed logs :) But the detailed log feature produced ~3Gb log file and takes 3x longer to build.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/gretard/sonar-sql-plugin/issues/1?email_source=notifications&email_token=AE3VN7H6OWT5D3YO5BK4XLDP6XYOXA5CNFSM4H7MSJ52YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZTV7FI#issuecomment-510091157, or mute the thread https://github.com/notifications/unsubscribe-auth/AE3VN7HODD2XVK2JGQW4GRTP6XYOXANCNFSM4H7MSJ5Q .

olsh commented 5 years ago

I'm using version 4_patch_2 from the page https://documentation.red-gate.com/scg/sql-code-guard-3-documentation/using-sql-code-guard-command-line

olsh commented 5 years ago

@gretard I've managed to get a more detailed log when a build fails, here it's:

[18:58:56][Step 5/5] 11:58:56.806 INFO: ------------------------------------------------------------------------
[18:58:56][Step 5/5] 11:58:56.806 INFO: EXECUTION FAILURE
[18:58:56][Step 5/5] 11:58:56.806 INFO: ------------------------------------------------------------------------
[18:58:56][Step 5/5] 11:58:56.808 INFO: Total time: 56.144s
[18:58:58][Step 5/5] 11:58:57.969 INFO: Final Memory: 195M/2287M
[18:58:58][Step 5/5] 11:58:57.969 INFO: ------------------------------------------------------------------------
[18:58:58][Step 5/5] 11:58:57.969 ERROR: Error during SonarQube Scanner execution
[18:58:58][Step 5/5] java.lang.NullPointerException
[18:58:58][Step 5/5]    at org.sonar.duplications.utils.FastStringComparator.compare(FastStringComparator.java:42)
[18:58:58][Step 5/5]    at org.sonar.duplications.index.PackedMemoryCloneIndex$2.isLess(PackedMemoryCloneIndex.java:365)
[18:58:58][Step 5/5]    at org.sonar.duplications.index.DataUtils.partition(DataUtils.java:82)
[18:58:58][Step 5/5]    at org.sonar.duplications.index.DataUtils.quickSort(DataUtils.java:104)
[18:58:58][Step 5/5]    at org.sonar.duplications.index.DataUtils.sort(DataUtils.java:62)
[18:58:58][Step 5/5]    at org.sonar.duplications.index.PackedMemoryCloneIndex.ensureSorted(PackedMemoryCloneIndex.java:307)
[18:58:58][Step 5/5]    at org.sonar.duplications.index.PackedMemoryCloneIndex.noResources(PackedMemoryCloneIndex.java:379)
[18:58:58][Step 5/5]    at org.sonar.scanner.cpd.index.SonarCpdBlockIndex.noResources(SonarCpdBlockIndex.java:116)
[18:58:58][Step 5/5]    at org.sonar.scanner.cpd.CpdExecutor.execute(CpdExecutor.java:95)
[18:58:58][Step 5/5]    at org.sonar.scanner.cpd.CpdExecutor.execute(CpdExecutor.java:90)
[18:58:58][Step 5/5]    at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:365)
[18:58:58][Step 5/5]    at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
[18:58:58][Step 5/5]    at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
[18:58:58][Step 5/5]    at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:141)
[18:58:58][Step 5/5]    at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
[18:58:58][Step 5/5]    at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
[18:58:58][Step 5/5]    at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:73)
[18:58:58][Step 5/5]    at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67)
[18:58:58][Step 5/5]    at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
[18:58:58][Step 5/5]    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[18:58:58][Step 5/5]    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[18:58:58][Step 5/5]    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[18:58:58][Step 5/5]    at java.lang.reflect.Method.invoke(Method.java:498)
[18:58:58][Step 5/5]    at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
[18:58:58][Step 5/5]    at com.sun.proxy.$Proxy0.execute(Unknown Source)
[18:58:58][Step 5/5]    at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:185)
[18:58:58][Step 5/5]    at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:137)
[18:58:58][Step 5/5]    at org.sonarsource.scanner.cli.Main.execute(Main.java:111)
[18:58:58][Step 5/5]    at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
[18:58:58][Step 5/5]    at org.sonarsource.scanner.cli.Main.main(Main.java:61)
[18:58:58][Step 5/5] Process returned exit code 1
[18:58:58][Step 5/5] The SonarQube Scanner did not complete successfully
[18:58:58][Step 5/5] 11:58:58.4  Post-processing failed. Exit code: 1
[18:58:58][Step 5/5] Process exited with code 1
[18:58:58][Step 5/5] Process exited with code 1 (Step: SonarScanner for MSBuild: finish analysis)
[18:58:58][Step 5/5] Step SonarScanner for MSBuild: finish analysis failed
gretard commented 5 years ago

Hi, I found a few problems. Could you try the latest version now https://github.com/gretard/sonar-sql-plugin/releases/tag/1.0.2 ? :)

olsh commented 5 years ago

Hi @gretard,

Thanks, will try it and let you know.

olsh commented 5 years ago

The analysis still fails with the following exception

[12:50:43][Step 6/6] 05:50:43.355 INFO: ------------------------------------------------------------------------
[12:50:43][Step 6/6] 05:50:43.355 INFO: EXECUTION FAILURE
[12:50:43][Step 6/6] 05:50:43.355 INFO: ------------------------------------------------------------------------
[12:50:43][Step 6/6] 05:50:43.355 INFO: Total time: 4:26.941s
[12:50:46][Step 6/6] 05:50:46.390 ERROR: Error during SonarQube Scanner execution
[12:50:46][Step 6/6] java.lang.NullPointerException
[12:50:46][Step 6/6]    at org.sonar.duplications.utils.FastStringComparator.compare(FastStringComparator.java:41)
[12:50:46][Step 6/6]    at org.sonar.duplications.index.PackedMemoryCloneIndex$2.isLess(PackedMemoryCloneIndex.java:365)
[12:50:46][Step 6/6]    at org.sonar.duplications.index.DataUtils.partition(DataUtils.java:79)
[12:50:46][Step 6/6]    at org.sonar.duplications.index.DataUtils.quickSort(DataUtils.java:104)
[12:50:46][Step 6/6]    at org.sonar.duplications.index.DataUtils.sort(DataUtils.java:62)
[12:50:46][Step 6/6]    at org.sonar.duplications.index.PackedMemoryCloneIndex.ensureSorted(PackedMemoryCloneIndex.java:307)
[12:50:46][Step 6/6]    at org.sonar.duplications.index.PackedMemoryCloneIndex.noResources(PackedMemoryCloneIndex.java:379)
[12:50:46][Step 6/6]    at org.sonar.scanner.cpd.index.SonarCpdBlockIndex.noResources(SonarCpdBlockIndex.java:116)
[12:50:46][Step 6/6]    at org.sonar.scanner.cpd.CpdExecutor.execute(CpdExecutor.java:95)
[12:50:46][Step 6/6]    at org.sonar.scanner.cpd.CpdExecutor.execute(CpdExecutor.java:90)
[12:50:46][Step 6/6]    at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:365)
[12:50:46][Step 6/6]    at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
[12:50:46][Step 6/6]    at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
[12:50:46][Step 6/6]    at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:141)
[12:50:46][Step 6/6]    at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
[12:50:46][Step 6/6]    at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
[12:50:46][Step 6/6]    at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:73)
[12:50:46][Step 6/6]    at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67)
[12:50:46][Step 6/6]    at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
[12:50:46][Step 6/6]    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[12:50:46][Step 6/6]    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[12:50:46][Step 6/6]    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[12:50:46][Step 6/6]    at java.lang.reflect.Method.invoke(Method.java:498)
[12:50:46][Step 6/6]    at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
[12:50:46][Step 6/6]    at com.sun.proxy.$Proxy0.execute(Unknown Source)
[12:50:46][Step 6/6]    at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:185)
[12:50:46][Step 6/6]    at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:137)
[12:50:46][Step 6/6]    at org.sonarsource.scanner.cli.Main.execute(Main.java:111)
[12:50:46][Step 6/6]    at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
[12:50:46][Step 6/6]    at org.sonarsource.scanner.cli.Main.main(Main.java:61)
[12:50:46][Step 6/6] 05:50:46.389 INFO: Final Memory: 1157M/3374M
[12:50:46][Step 6/6] 05:50:46.389 INFO: ------------------------------------------------------------------------
[12:50:47][Step 6/6] The SonarQube Scanner did not complete successfully
[12:50:47][Step 6/6] Process returned exit code 1
[12:50:47][Step 6/6] 05:50:47.026  Post-processing failed. Exit code: 1
[12:50:47][Step 6/6] Process exited with code 1
[12:50:47][Step 6/6] Process exited with code 1 (Step: SonarScanner for MSBuild: finish analysis)
[12:50:47][Step 6/6] Step SonarScanner for MSBuild: finish analysis failed

I'm using SonarQube 7.9.1 and MSBuild scanner for SQ 4.6.2 (the latest versions at the moment)

gretard commented 5 years ago

Hi, seems that other issue was solved, but this one - no. I tested with sonar-scanner cli. Will try to reproduce this issue using MSBuild scanner. Which Java version are you using?

olsh commented 5 years ago
C:\Windows\system32>java -version
java version "1.8.0_211"
Java(TM) SE Runtime Environment (build 1.8.0_211-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.211-b12, mixed mode)

Sometimes the build is passed, without changing SQ configuration.

gretard commented 5 years ago

Hello,

I haven't managed to reproduce the issue, however I added a few checks for tokenizing. Could you try latest development version from here , for example: https://dev.azure.com/kgreta/2319744a-731b-48e3-81da-94790c701078/_apis/build/builds/54/artifacts?artifactName=build-Linux&api-version=5.1&%24format=zip. You will need to copy jar file to the extensions/downloads folder :)

olsh commented 5 years ago

Hello @gretard,

I run ~10 analysis, all are passed. So I think it's fixed :)

gretard commented 5 years ago

Great, then I will release a new version as this version also includes rules skip feature :)

2019-07-19, pn 12:22, Oleg Shevchenko notifications@github.com rašė:

Hello @gretard https://github.com/gretard,

I run ~10 analysis, all are passed. So I think it's fixed :)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/gretard/sonar-sql-plugin/issues/1?email_source=notifications&email_token=AE3VN7GOFORBB5JULUNFUHDQAGBT5A5CNFSM4H7MSJ52YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2LDEKI#issuecomment-513159721, or mute the thread https://github.com/notifications/unsubscribe-auth/AE3VN7DGYAMJECFWYTPPGV3QAGBT5ANCNFSM4H7MSJ5Q .

olsh commented 5 years ago

Thank you!