Cannot invoke "org.sonar.db.qualityprofile.QProfileDto.getKee()" in 2025.1 LTA

Summary

  • SonarQube Server (Enterprise)
  • Docker - sonarqube:2025-lta-enterprise (v2025.1 102418) (just upgraded from 9.9)
  • Errors when running Analyze tasks from Azure DevOps pipelines

Since upgrading to 2025-lta all Analyze tasks are failing with the error

Cannot invoke "org.sonar.db.qualityprofile.QProfileDto.getKee()" because the return value of "java.util.Map.get(Object)" is null

after a failed request to

http://sonarqube.bpdevops.co.uk/api/qualityprofiles/search.protobuf?project=<PROJECT_KEY>

All of our projects are using the Instance default quality profile, which is Sonar way BUILT-IN.

What Happens…

Azure Pipeline task fails with error

Failed to load the quality profiles of project '<PROJECT_KEY>'
Full error:

##[error]11:40:46.543 ERROR Error during SonarScanner Engine execution
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'jdk.internal.loader.ClassLoaders$AppClassLoader@39ea3325-org.sonar.scanner.report.ReportPublisher': Unsatisfied dependency expressed through constructor parameter 7: Error creating bean with name 'jdk.internal.loader.ClassLoaders$AppClassLoader@39ea3325-org.sonar.scanner.report.MetadataPublisher': Unsatisfied dependency expressed through constructor parameter 2: Error creating bean with name 'QualityProfiles' defined in org.sonar.scanner.repository.QualityProfilesProvider: Failed to instantiate [org.sonar.scanner.rule.QualityProfiles]: Factory method 'provide' threw exception with message: Failed to load the quality profiles of project '<PROJECT_KEY>': An error has occurred. Please contact your administrator
sonarqube_access log reports a 500 error
172.17.0.3 - - [27/Feb/2025:10:55:01 +0000] "GET /api/qualityprofiles/search.protobuf?project=<PROJECT_KEY> HTTP/1.1" 500 - "-" "ScannerCLI/6.2.1.4610" "e259ba7f-f798-449e-896c-a05c0736af89" 22
sonarqube_web log shows NullPointerException

Cannot invoke "org.sonar.db.qualityprofile.QProfileDto.getKee()" because the return value of "java.util.Map.get(Object)" is null

Full error:

ERROR web[e5462302-ab4d-4586-85ad-ca6f14e17c67][o.s.s.w.WebServiceEngine] Fail to process request http://<SERVER_URL>/api/qualityprofiles/search.protobuf?project=<PROJECT_KEY>
java.lang.NullPointerException: Cannot invoke "org.sonar.db.qualityprofile.QProfileDto.getKee()" because the return value of "java.util.Map.get(Object)" is null

What I’ve tried so far…

Using a test project with TypeScript. Created a new Quality Profile for TypeScript by copying Sonar way BUILT-IN, and associated it with the project. Re-ran analysis - same error.

Same error on another Topic

Another user reported the same error here back in June 2024 but it was not resolved and thread went cold. There is a recommendation on that Topic to delete the /data/es8* directory and restart the service. I have tried that but the problem persists.

Hi @random-devops,

Could you please check the default quality profile in the Quality Profiles tab on the UI? Then, please try to change it and see if the issues are still present.

Also, could you please help us and send a complete stack trace? It would be easier to locate the specific code.

Thanks
Csaba

did anyone have any luck with resolving this? I’m encountering the exact same issue when updating from lts-community to 25.1.

I’ve included an attachment with the stacktrace for the failed request
sonarqube_web (3).log (14.6 KB)

are there any updates behind the scenes? thanks

Hi @Sam_Kemp,

We are still trying to figure what is happening.

Would you mind sharing the results of the following endpoint calls from your instance, please ?

  • /api/languages/list
  • /api/qualityprofiles/search

That being said, our handling of the NPE here should be improved. I created SONAR-25293 on our side to handle it.

thanks for the update. I’ve attached the results for the two endpoints.

sonar_debug_endpoint_calls.txt (19.9 KB)

Hi @Sam_Kemp,

Thank you for the endpoint results, it was very useful.

You have a bunch of quality profiles that are not Default, which is really weird because they are the only one for the language they target, so they should be “Default”.

I need to understand why this happened, probably something to do with the migration and your database state before the migration.

To unblock you, one thing you could try is to go to your Quality Profiles and make sure you have a default one for every language listed there. (You should be able to set them as “Default” directly, see capture attached).

Let me know if that works for you.

Cheers