Failed to load the quality profiles after upgrade from 8.4.2 to 8.9.0

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)

    14:29:46.985 INFO: SonarScanner 4.5.0.2216
    14:29:46.985 INFO: Java 1.8.0_281 Oracle Corporation (64-bit)
    14:29:46.985 INFO: Mac OS X 10.16 x86_64
    14:29:49.138 INFO: Analyzing on SonarQube server 8.9.0
    14:29:49.139 INFO: Default locale: “en_AU”, source code encoding: “UTF-8”
    14:29:49.142 DEBUG: Execution execute
    14:29:49.354 WARN: SonarScanner will require Java 11 to run, starting in SonarQube 9.x
    14:29:49.355 DEBUG: Developer 8.9.0.43852

  • Upgrade from
    Sonarqube 8.4.2

  • sonar-scanner worked fine with this version
  • what have you tried so far to achieve this
    After upgrading to 8.9.0.43852, we are unable to complete a sonar scan successfully. It fails with the following error:
    14:29:53.527 DEBUG: GET 500 https://sq1.tools.anonyome.com/api/qualityprofiles/search.protobuf?project=SudoBrowserCore-iOS | time=255ms
    14:29:53.567 INFO: ------------------------------------------------------------------------
    14:29:53.567 INFO: EXECUTION FAILURE
    14:29:53.567 INFO: ------------------------------------------------------------------------`
    

— CUT —
> Caused by: java.lang.IllegalStateException: Unable to load component class org.sonar.scanner.rule.QualityProfiles
— CUT —
> Caused by: java.lang.IllegalStateException: Failed to load the quality profiles of project ‘SudoBrowserCore-iOS’: An error has occurred. Please contact your administrator

A number of requests do receive OK responses (200), for some reason we are getting a 500 when getting the quality profiles.

When checking the Quality Profiles for our projects they appear to be configured as expected:

The web.log also shows a null pointer exception:
> 2021.06.01 04:51:21 ERROR web[AXnFtEshW2PBS2nUAAX4][o.s.s.w.WebServiceEngine] Fail to process request http://127.0.0.1:9000/api/qualityprofiles/search.protobuf?project=SudoBrowserCore-iOS
> java.lang.NullPointerException: null

It is worth noting that the underlying operating system system had also been updated from Ubuntu 16 to 20. This may have been the original cause (as opposed to just upgrading to the LTS version).

Do you have any ideas on how we can resolve this problem?

It seems this was a corrupted database problem, postgresql got updated and the data migration failed. In the end, we emptied the database and the system recovered. This isn’t ideal and we now need to reconfigure our projects but at least we can move forward.

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