annu
annu

Reputation: 137

Getting error while run sonar-scanner: java.lang.NoClassDefFoundError: org/sonar/batch/bootstrapper/LogOutput$Level

sonar-scanner -X
19:49:25.192 INFO: Scanner configuration file: /usr/local/Cellar/sonar-scanner/3.1.0.1141/libexec/conf/sonar-scanner.properties

19:49:25.211 INFO: SonarQube Scanner 3.1.0.1141
19:49:25.212 INFO: Java 1.8.0_131 Oracle Corporation (64-bit)
19:49:25.212 INFO: Mac OS X 10.13 x86_64
19:49:25.363 DEBUG: keyStore is : 
19:49:25.363 DEBUG: keyStore type is : jks
19:49:25.363 DEBUG: keyStore provider is : 


19:49:25.589 DEBUG: Create isolated classloader...
19:49:25.597 DEBUG: Start temp cleaning...
19:49:25.607 DEBUG: Temp cleaning done
19:49:25.607 DEBUG: Execution getVersion

Upvotes: 0

Views: 4205

Answers (1)

agabrys
agabrys

Reputation: 9116

SonarQube Scanner 3.1.0.1141 (19:49:25.211 INFO: SonarQube Scanner 3.1.0.1141) is compatible with SonarQube 5.6+ (LTS) (read more here). You have SonarQube server 5.0.1 (19:49:25.610 INFO: SonarQube server 5.0.1) so those two tools are incompatible (class org/sonar/batch/bootstrapper/LogOutput$Level has been added in 5.2).

You can:

  • use an older version of the scanner (download sonar-runner 2.4 - read about runner vs scanner)
  • upgrade SonarQube server to at least 5.6

Upvotes: 4

Related Questions