Gradle SonarQube Plugin Analysis fails at the very end with MySQLNonTransientConnectionException

858 views Asked by At

We have a multi-project Gradle build (7 projects). I am using the just released Gradle SonarQube plugin (http://docs.sonarqube.org/display/SONAR/Analyzing+with+Gradle). Our Sonar 5.1.1 instance is on a remote host (Azure VM). MySQL database with default settings (16M Query Cache, 512MB Innodb buffer). We are analysing only Java source. Everything seems to work fine - and infact, all the reports are sent to Sonar and committed (i.e we can see the analysis results). But the Gradle task does not exit cleanly.

10:21:40.236 INFO  - Analysis reports generated in 89ms, dir size=165 KB
10:21:40.341 INFO  - Analysis reports compressed in 105ms, zip size=166 KB
10:21:40.341 DEBUG - Publish results
10:21:40.722 INFO  - Analysis reports sent to server in 381ms
10:21:40.722 INFO  - ANALYSIS SUCCESSFUL, you can browse http://104.45.20.156:9000/sonar/dashboard/index/adm
10:21:40.722 INFO  - Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report.
10:21:40.723 DEBUG - Post-jobs : 
10:21:40.723 DEBUG - Release semaphore on project : org.sonar.api.resources.Project@f7904ea[id=1770,key=adm,qualifier=TRK], with key batch-adm
10:37:50.391 ERROR - JDBC commit failed
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Communications link failure during commit(). Transaction resolution unknown.
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_45-internal]
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_45-internal]
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_45-internal]
    at java.lang.reflect.Constructor.newInstance(Constructor.java:422) ~[na:1.8.0_45-internal]
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:377) ~[mysql-connector-java-5.1.34.jar:5.1.34]
    at com.mysql.jdbc.Util.getInstance(Util.java:360) ~[mysql-connector-java-5.1.34.jar:5.1.34]
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956) ~[mysql-connector-java-5.1.34.jar:5.1.34]
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:935) ~[mysql-connector-java-5.1.34.jar:5.1.34]
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:924) ~[mysql-connector-java-5.1.34.jar:5.1.34]
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:870) ~[mysql-connector-java-5.1.34.jar:5.1.34]
    at com.mysql.jdbc.ConnectionImpl.commit(ConnectionImpl.java:1611) ~[mysql-connector-java-5.1.34.jar:5.1.34]
    at org.apache.commons.dbcp.DelegatingConnection.commit(DelegatingConnection.java:334) ~[sonar-batch-maven-compat-5.1.1.jar:na]
    at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.commit(PoolingDataSource.java:211) ~[sonar-batch-maven-compat-5.1.1.jar:na]
    at org.hibernate.transaction.JDBCTransaction.commitAndResetAutoCommit(JDBCTransaction.java:170) ~[sonar-batch-maven-compat-5.1.1.jar:na]
    at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:146) ~[sonar-batch-maven-compat-5.1.1.jar:na]
    at org.hibernate.ejb.TransactionImpl.commit(TransactionImpl.java:54) [sonar-batch-maven-compat-5.1.1.jar:na]
    at org.sonar.jpa.session.JpaDatabaseSession.commit(JpaDatabaseSession.java:83) [sonar-batch-maven-compat-5.1.1.jar:na]
    at org.sonar.jpa.session.JpaDatabaseSession.commitAndClose(JpaDatabaseSession.java:69) [sonar-batch-maven-compat-5.1.1.jar:na]
    at org.sonar.jpa.session.JpaDatabaseSession.stop(JpaDatabaseSession.java:64) [sonar-batch-maven-compat-5.1.1.jar:na]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_45-internal]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_45-internal]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_45-internal]
    at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_45-internal]
    at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:110) [sonar-batch-maven-compat-5.1.1.jar:na]
    at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.stop(ReflectionLifecycleStrategy.java:96) [sonar-batch-maven-compat-5.1.1.jar:na]
    at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.stop(AbstractInjectionFactory.java:88) [sonar-batch-maven-compat-5.1.1.jar:na]
    at org.picocontainer.behaviors.AbstractBehavior.stop(AbstractBehavior.java:179) [sonar-batch-maven-compat-5.1.1.jar:na]
    at org.picocontainer.behaviors.Stored$RealComponentLifecycle.stop(Stored.java:141) [sonar-batch-maven-compat-5.1.1.jar:na]
    at org.picocontainer.behaviors.Stored.stop(Stored.java:118) [sonar-batch-maven-compat-5.1.1.jar:na]
    at org.picocontainer.DefaultPicoContainer.stopAdapters(DefaultPicoContainer.java:1047) [sonar-batch-maven-compat-5.1.1.jar:na]
    at org.picocontainer.DefaultPicoContainer.stop(DefaultPicoContainer.java:802) [sonar-batch-maven-compat-5.1.1.jar:na]
    at org.sonar.api.platform.ComponentContainer.stopComponents(ComponentContainer.java:123) [sonar-batch-maven-compat-5.1.1.jar:na]
    at org.sonar.api.platform.ComponentContainer.stopComponents(ComponentContainer.java:118) [sonar-batch-maven-compat-5.1.1.jar:na]
    at org.sonar.batch.bootstrapper.Batch.stop(Batch.java:107) [sonar-batch-maven-compat-5.1.1.jar:na]
    at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67) [sonar-batch-maven-compat-5.1.1.jar:na]
    at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:48) [sonar-runner-batch8742162731148716300.jar:na]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_45-internal]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_45-internal]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_45-internal]
    at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_45-internal]
    at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87) [sonar-runner-api-2.4.jar:na]
    at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75) [sonar-runner-api-2.4.jar:na]
    at java.security.AccessController.doPrivileged(Native Method) [na:1.8.0_45-internal]
    at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69) [sonar-runner-api-2.4.jar:na]
    at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50) [sonar-runner-api-2.4.jar:na]
    at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102) [sonar-runner-api-2.4.jar:na]
    at org.sonar.runner.api.Runner.execute(Runner.java:100) [sonar-runner-api-2.4.jar:na]
    at org.sonarqube.gradle.SonarQubeTask.run(SonarQubeTask.java:50) [gradle-sonarqube-plugin-1.0.jar:na]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_45-internal]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_45-internal]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_45-internal]
    at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_45-internal]
    at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75) [gradle-base-services-2.4.jar:2.4]
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:226) [gradle-core-2.4.jar:2.4]
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:219) [gradle-core-2.4.jar:2.4]
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:208) [gradle-core-2.4.jar:2.4]
    at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:589) [gradle-core-2.4.jar:2.4]
    at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:572) [gradle-core-2.4.jar:2.4]
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80) [gradle-core-2.4.jar:2.4]
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61) [gradle-core-2.4.jar:2.4]
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46) [gradle-core-2.4.jar:2.4]
    at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35) [gradle-core-2.4.jar:2.4]
    at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64) [gradle-core-2.4.jar:2.4]
    at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58) [gradle-core-2.4.jar:2.4]
    at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:42) [gradle-core-2.4.jar:2.4]
    at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52) [gradle-core-2.4.jar:2.4]
    at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53) [gradle-core-2.4.jar:2.4]
    at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43) [gradle-core-2.4.jar:2.4]
    at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:310) [gradle-core-2.4.jar:2.4]
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.executeTask(AbstractTaskPlanExecutor.java:79) [gradle-core-2.4.jar:2.4]
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:63) [gradle-core-2.4.jar:2.4]
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:51) [gradle-core-2.4.jar:2.4]
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:23) [gradle-core-2.4.jar:2.4]
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:88) [gradle-core-2.4.jar:2.4]
    at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37) [gradle-core-2.4.jar:2.4]
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:62) [gradle-core-2.4.jar:2.4]
    at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23) [gradle-core-2.4.jar:2.4]
    at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:68) [gradle-core-2.4.jar:2.4]
    at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32) [gradle-core-2.4.jar:2.4]
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:62) [gradle-core-2.4.jar:2.4]
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:55) [gradle-core-2.4.jar:2.4]
    at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:149) [gradle-core-2.4.jar:2.4]
    at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:106) [gradle-core-2.4.jar:2.4]
    at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:86) [gradle-core-2.4.jar:2.4]
    at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:90) [gradle-launcher-2.4.jar:2.4]
    at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28) [gradle-launcher-2.4.jar:2.4]
    at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35) [gradle-launcher-2.4.jar:2.4]
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:41) [gradle-launcher-2.4.jar:2.4]
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:28) [gradle-launcher-2.4.jar:2.4]
    at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:50) [gradle-launcher-2.4.jar:2.4]
    at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:27) [gradle-launcher-2.4.jar:2.4]
    at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:40) [gradle-launcher-2.4.jar:2.4]
    at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:169) [gradle-base-services-2.4.jar:2.4]
    at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:237) [gradle-launcher-2.4.jar:2.4]
    at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:210) [gradle-launcher-2.4.jar:2.4]
    at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35) [gradle-launcher-2.4.jar:2.4]
    at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24) [gradle-launcher-2.4.jar:2.4]
    at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:206) [gradle-launcher-2.4.jar:2.4]
    at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169) [gradle-launcher-2.4.jar:2.4]
    at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33) [gradle-launcher-2.4.jar:2.4]
    at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22) [gradle-launcher-2.4.jar:2.4]
    at org.gradle.launcher.Main.doAction(Main.java:33) [gradle-launcher-2.4.jar:2.4]
    at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45) [gradle-launcher-2.4.jar:2.4]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_45-internal]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_45-internal]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_45-internal]
    at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_45-internal]
    at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:54) [gradle-launcher-2.4.jar:2.4]
    at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35) [gradle-launcher-2.4.jar:2.4]
    at org.gradle.launcher.GradleMain.main(GradleMain.java:23) [gradle-launcher-2.4.jar:2.4]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_45-internal]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_45-internal]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_45-internal]
    at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_45-internal]
    at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30) [gradle-wrapper.jar:2.2.1]
    at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:127) [gradle-wrapper.jar:2.2.1]
    at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:56) [gradle-wrapper.jar:2.2.1]
10:37:50.393 WARN  - SQL Error: 0, SQLState: null
10:37:50.393 ERROR - Already closed.
:sonarqube FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':sonarqube'.
> Unable to execute Sonar

* Try:
Run with --info or --debug option to get more log output.

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':sonarqube'.
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
    at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
    at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)
    at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
    at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:42)
    at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
    at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
    at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
    at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:310)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.executeTask(AbstractTaskPlanExecutor.java:79)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:63)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:51)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:23)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:88)
    at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:62)
    at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)
    at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:68)
    at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:62)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:55)
    at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:149)
    at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:106)
    at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:86)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:90)
    at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)
    at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:41)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:28)
    at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:50)
    at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:27)
    at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:40)
    at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:169)
    at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:237)
    at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:210)
    at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35)
    at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
    at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:206)
    at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)
    at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
    at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
    at org.gradle.launcher.Main.doAction(Main.java:33)
    at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
    at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:54)
    at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35)
    at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
    at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30)
    at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:127)
    at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:56)
Caused by: org.sonar.runner.impl.RunnerException: Unable to execute Sonar
    at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91)
    at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
    at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
    at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
    at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
    at org.sonar.runner.api.Runner.execute(Runner.java:100)
    at org.sonarqube.gradle.SonarQubeTask.run(SonarQubeTask.java:50)
    at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:226)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:219)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:208)
    at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:589)
    at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:572)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
    ... 49 more
Caused by: org.hibernate.exception.GenericJDBCException: Cannot release connection
    at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126)
    at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114)
    at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
    at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:52)
    at org.hibernate.jdbc.ConnectionManager.closeConnection(ConnectionManager.java:478)
    at org.hibernate.jdbc.ConnectionManager.aggressiveRelease(ConnectionManager.java:429)
    at org.hibernate.jdbc.ConnectionManager.afterTransaction(ConnectionManager.java:316)
    at org.hibernate.jdbc.JDBCContext.afterTransactionCompletion(JDBCContext.java:248)
    at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:158)
    at org.hibernate.ejb.TransactionImpl.commit(TransactionImpl.java:54)
    at org.sonar.jpa.session.JpaDatabaseSession.commit(JpaDatabaseSession.java:83)
    at org.sonar.jpa.session.JpaDatabaseSession.commitAndClose(JpaDatabaseSession.java:69)
    at org.sonar.jpa.session.JpaDatabaseSession.stop(JpaDatabaseSession.java:64)
    at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:110)
    at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.stop(ReflectionLifecycleStrategy.java:96)
    at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.stop(AbstractInjectionFactory.java:88)
    at org.picocontainer.behaviors.AbstractBehavior.stop(AbstractBehavior.java:179)
    at org.picocontainer.behaviors.Stored$RealComponentLifecycle.stop(Stored.java:141)
    at org.picocontainer.behaviors.Stored.stop(Stored.java:118)
    at org.picocontainer.DefaultPicoContainer.stopAdapters(DefaultPicoContainer.java:1047)
    at org.picocontainer.DefaultPicoContainer.stop(DefaultPicoContainer.java:802)
    at org.sonar.api.platform.ComponentContainer.stopComponents(ComponentContainer.java:123)
    at org.sonar.api.platform.ComponentContainer.stopComponents(ComponentContainer.java:118)
    at org.sonar.batch.bootstrapper.Batch.stop(Batch.java:107)
    at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67)
    at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:48)
    at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87)
    ... 63 more
Caused by: java.sql.SQLException: Already closed.
    at org.apache.commons.dbcp.PoolableConnection.close(PoolableConnection.java:114)
    at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.close(PoolingDataSource.java:191)
    at org.hibernate.connection.DatasourceConnectionProvider.closeConnection(DatasourceConnectionProvider.java:97)
    at org.hibernate.jdbc.ConnectionManager.closeConnection(ConnectionManager.java:474)
    ... 85 more

BUILD FAILED

We are running with -Dsonar.verbose=true and -Dsonar.host.url and -Dsonar.jdbc.url.

Our sonar settings inside Gradle look like this :

sonarqube {
    properties {
        property "sonar.scm.provider", "git"

        property "java.coveragePlugin", "jacoco"

        property "sonar.jdbc.username", "----"
        property "sonar.jdbc.password", "----"
    }
}

We have exlusion filters set on the remote Sonar instance and force auth is false (default).

Any help is appreciated, thanks.

0

There are 0 answers