I have many errors with sonarqube analyse in the Jenkins job with the analyse success
[ERROR] [14:36:44.124] Class not found: org.joda.convert.FromString
[ERROR] [14:36:44.126] Class not found: org.joda.convert.ToString
[ERROR] [14:34:42.441] Class not found: org.apache.commons.logging.Log
[ERROR] [14:34:42.724] Class not found: org.apache.oro.text.perl.Perl5Util
[ERROR] [14:34:31.442] Class not found: io.swagger.annotations.ApiModel
[ERROR] [14:34:31.442] Class not found: io.swagger.annotations.ApiModelProperty
[ERROR] [14:28:37.756] Class not found: org.apache.commons.logging.Log
[ERROR] [14:28:40.030] Class not found: org.apache.oro.text.perl.Perl5Util
SonareQube : 5.1.2
sonarQube jenkins plugin : 2.6
JDK : 1.7
Any help please
thanks
The SonarQube server require Java version 11 and the SonarQube scanners require Java version 11 or 17. SonarQube is able to analyze any kind of Java source files regardless of the version of Java they comply to. We recommend using the Critical Patch Update (CPU) releases.
There are three types of issues: Bug – A coding mistake that can lead to an error or unexpected behavior at runtime. Vulnerability – A point in your code that's open to attack. Code Smell – A maintainability issue that makes your code confusing and difficult to maintain.
Add the following dependency to your pom
<dependency>
<groupId>org.joda</groupId>
<artifactId>joda-convert</artifactId>
<version>1.8.1</version>
<scope>provided</scope>
</dependency>
This error is displayed when the .class file of the mentioned class is not found. This might results in less accurate and less precise issues raised.
You should check your analysis configuration and more specifically the sonar.java.libraries
property to be sure you provide the correct dependency to your project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With