Maven Sonar Task on Jenkins fails since SonarQube 10.5.0

We are using Jenkins and since Updating our SonarQube to 10.5.0, the Sonar Maven Plugin failes with the following Exception:

[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.11.0.3922:sonar (default-cli) on project com......: 
Unable to load components interface org.sonar.api.batch.sensor.Sensor: Error creating bean with name 'ClassRealm{pmd}-org.sonar.plugins.pmd.PmdSensor': 
Unsatisfied dependency expressed through constructor parameter 1; nested exception is 
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 
'ClassRealm{pmd}-org.sonar.plugins.pmd.PmdExecutor': 
Resolution of declared constructors on bean Class [org.sonar.plugins.pmd.PmdExecutor] from ClassLoader [ClassRealm{pmd}] failed; nested 
exception is java.lang.NoClassDefFoundError: org/sonar/plugins/java/api/JavaResourceLocator: org.sonar.plugins.java.api.JavaResourceLocator -> [Help 1]

Does anyone else see an error like this and is there a solution?

Thanks!

Hey there.

It looks like you’re using GitHub - jborgers/sonar-pmd: ☕️ PMD Plugin for SonarQube which is not marked compatible in the plugin version matrix.

Take a look at this issue here:

The only workaround will be to deactivate the feature in the UI (search for the sonar.plugins.downloadOnlyRequired property).

That fixed the error - Thank you :slight_smile:

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