Question

I installed Sonar and I have already used sonarrunner by command line and It worked fine, but when I tried to integrate with Jenkins, the autommated process failed with the following error, anyone knows how to solve this?

[default] $ C:\sonarqube-4.0\sonar-runner-2.3\bin\sonar-runner.bat -Dsonar.jdbc.driver=org.postgresql.Driver -Dsonar.jdbc.url=sonar.jdbc.url=jdbc:postgresql://10.2.1.5/sonarqube ******** ******** -Dsonar.host.url=http://localhost:9000 ******** ******** "-Dsonar.projectBaseDir=C:\Program Files (x86)\Jenkins\jobs\Project\workspace\default"
C:\sonarqube-4.0\sonar-runner-2.3
SonarQube Runner 2.3
Java 1.7.0_25 Oracle Corporation (64-bit)
Windows 7 6.1 amd64
INFO: Runner configuration file: C:\sonarqube-4.0\sonar-runner-2.3\conf\sonar-runner.properties
INFO: Project configuration file: NONE
INFO: Default locale: "pt_BR", source code encoding: "windows-1252" (analysis is platform dependent)
INFO: Work directory: C:\Program Files (x86)\Jenkins\jobs\Project\workspace\default\.sonar
INFO: SonarQube Server 4.0
16:21:06.107 INFO  - Load batch settings
16:21:08.700 INFO  - User cache: C:\.sonar\cache
16:21:08.734 INFO  - Install plugins
16:21:13.244 INFO  - Install JDBC driver
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 34.683s
Final Memory: 2M/59M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
ERROR: Unable to execute Sonar
ERROR: Caused by: Unable to determine database dialect to use within sonar with dialect null jdbc url sonar.jdbc.url=jdbc:postgresql://10.2.1.5/sonarqube
ERROR: 
ERROR: To see the full stack trace of the errors, re-run SonarQube Runner with the -e switch.
ERROR: Re-run SonarQube Runner using the -X switch to enable full debug logging.
Build step 'Invoke Standalone Sonar Analysis' marked build as failure
Finished: FAILURE
Was it helpful?

Solution

There is a typo in your property definitions: -Dsonar.jdbc.url=sonar.jdbc.url=jdbc:postgresql://10.2.1.5/sonarqube should read -Dsonar.jdbc.url=jdbc:postgresql://10.2.1.5/sonarqube

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top