Today I upgraded our companies’ SonarQube instance from 5.1.2 to version 5.2. We run it on an Azure VM and it is connected to our Visual Studio Online instance.Although the update process is described on the website of SonarQube, some additional notes might help others to migrate and to prevent any errors. I found the upgrade instructions on http://docs.sonarqube.org/display/SONAR/Upgrading. As this might get changed at some point in time, I included a screenshot below:
There are two issues I ran into. The first one is making changes in the sonar.properties file. A connectionstring to the database is included there. My original connectionstring looked like this:
The new one should be:
If you don’t change this, the SonarQube service will not start and you will find an error in the log file ([installationpath]\logs\sonar.log):
WrapperSimpleApp: Encountered an error running main: org.sonar.process.MessageException: Unsupported JDBC driver provider: jtds
org.sonar.process.MessageException: Unsupported JDBC driver provider: jtds
The second issue I ran into is that I am missing a step where the old SonarQube directory is replaced by the new one. I have C:\SonarQube and I extracted the new zip into C:\SonarQube_New. Then I executed the steps as outlined on the SonarQube website. But nowhere was mentioned to replace the old SonarQube directory. So between step 8 and step 9, you need to rename C:\SonarQube (or the dir you use) to C:\SonarQube_Old and rename C:\SonarQube_New to C:\SonarQube. After that you can continue with step 9 and start the webserver. If you don’t do this, you’ll still have the old version of SonarQube running.
Furthermore, there is one big enhancement in this new version which has impact on the integration with Visual Studio Online: no direct database access is necessary anymore. Previously, in the Build Definition, you’d need to specify the database connection, but this is not necessary anymore, so a big improvement!