Error with sonar scan in jenkins

I created a pipe line in jekins, while i have trigred the job i am getting below error. Any one help to resolve that.

13:24:09.385 ERROR: Error during SonarQube Scanner execution
java.lang.NoSuchMethodError: 'org.sonar.batch.bootstrapper.Batch$Builder org.sonar.batch.bootstrapper.Batch$Builder.setBootstrapProperties(java.util.Map)'
	at org.sonarsource.scanner.api.internal.batch.DefaultBatchFactory.createBatch(DefaultBatchFactory.java:38)
	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.start(BatchIsolatedLauncher.java:52)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
	at jdk.proxy1/jdk.proxy1.$Proxy0.start(Unknown Source)
	at org.sonarsource.scanner.api.EmbeddedScanner.doStart(EmbeddedScanner.java:220)
	at org.sonarsource.scanner.api.EmbeddedScanner.start(EmbeddedScanner.java:156)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:74)
	at org.sonarsource.scanner.cli.Main.main(Main.java:61)
WARN: Unable to locate 'report-task.txt' in the workspace. Did the SonarScanner succeed?
ERROR: SonarQube scanner exited with non-zero code: 1
Notifying upstream projects of job completion
Finished: FAILURE```

Hi,

Welcome to the community!

Can you provide the full analysis log, starting from the analysis command itself?

The analysis / scanner log is what’s output from the analysis command. Hopefully, the log you provide - redacted as necessary - will include that command as well.

This guide will help you find them.

 
Ann

Hi,

this indicates a compatibility issue between the versions of SonarQube scanner and the SonarQube server.

What are your versions of
Sonarqube
Sonar Jenkins plugin
Sonar CLI scanner | Sonar maven plugin if using maven
Java used for the Sonarqube analysis

Gilbert

1 Like