We have been running Sonarqube 10.6 connecting to Azure SQL using managed identity. My connection string looks similar to:
sonar.jdbc.url=jdbc:sqlserver://#######.database.###cloudapi.net:1433;database=sonar;encrypt=true;trustServerCertificate=false;loginTimeout=30;Authentication=ActiveDirectoryMSI
We get the following error when starting the service:
> 2025.03.19 16:56:28 WARN web[][o.s.c.a.AnnotationConfigApplicationContext] Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jdk.internal.loader.ClassLoaders$AppClassLoader@659e0bfd-org.sonar.db.DefaultDatabase': com/azure/identity/ManagedIdentityCredential
> 2025.03.19 16:56:28 ERROR web[][o.s.s.p.w.PlatformServletContextListener] Web server startup failed
> org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jdk.internal.loader.ClassLoaders$AppClassLoader@659e0bfd-org.sonar.db.DefaultDatabase': com/azure/identity/ManagedIdentityCredential
>
> Caused by: java.lang.ClassNotFoundException: com.azure.identity.ManagedIdentityCredential
Any assistance is appreciated. Note, service is using the local service and a managed identity for the host server has a login on the database, same as prior to upgrade.