Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@54de6776-org

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    we are using SonarQube Scanner for JenkinsVersion2.17.2 and getting below error and sonarqube is accessible and locally everything works fine but getting below error when executed from jenkins it throws below error

  • What went wrong:
    Execution failed for task ‘:sonarqube’.

Error creating bean with name ‘org.sonarsource.scanner.api.internal.IsolatedClassloader@54de6776-org.sonar.scanner.bootstrap.ScannerPluginRepository’: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org.sonarsource.scanner.api.internal.IsolatedClassloader@54de6776-org.sonar.scanner.bootstrap.ScannerPluginInstaller’: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org.sonarsource.scanner.api.internal.IsolatedClassloader@54de6776-org.sonar.scanner.bootstrap.PluginFiles’: Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘GlobalConfiguration’ defined in org.sonar.scanner.bootstrap.GlobalConfigurationProvider: Unsatisfied dependency expressed through method ‘provide’ parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘GlobalServerSettings’ defined in org.sonar.scanner.bootstrap.GlobalServerSettingsProvider: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.scanner.bootstrap.GlobalServerSettings]: Factory method ‘provide’ threw exception; nested exception is Not authorized. Please check the user token in the property ‘sonar.token’ or the credentials in the properties ‘sonar.login’ and ‘sonar.password’.

Hey there.

It looks like you need to adjust your authentication. Make sure you attach credentials to the SonarQube server you define, and that those credentials have Execute Analysis permissions on the project in question.

Hi Colin,
thanks for responding back, we are using token and when I try to access it via curl with same token it works fine.
I have even defined in my gradle.properties file.

Access what via curl? What token type is it?

I think it is a global token.

How about you generate a new one, just to be sure.

btw, is there a process to reset the Admin password for sonarQube, the person who setup SonarQube in our org has left the company and no one knows where he saved the password.

I’ll try to generate a new one and see.

Thank you for your help.