Unable to load component class

if we are running the command in ci it is running but not generating the sonar-rport.json file.
sh “ant -Dsonar.issuesReport.html.enable=true -Dsonar.report.export.path=sonar-report.json sonarcheck -v”

  1. if we are trying to use this property, to scan files from different location we are getting error(Please see the attached logs for this error as the complete error logs is large)

sonar.projectBaseDir=/home/jenkins/workspace

this is properties file we are using

sonar.issuesReport.html.enable=true
sonar.issuesReport.console.enable=true
sonar.issuesReport.json.enable=true
sonar.report.export.path=sonar-report.json
sonar.issuesReport.lightModeOnly=true

Hi,

Welcome to the community!

Your title doesn’t seem to me to relate to the body of your post. The issues report functionality was dropped several years ago. So if the problem is that you’re not getting a report, well that’s expected.

You mention a log attachment, but I don’t see it. There are some restrictions on what new users can do. If I haven’t already answered your question, please do copy/paste the log into your original post or into a reply.

 
Thx,
Ann

Hi Ann,

Here is log File
SonarDirectoryLogs.txt (14.0 KB)

Thanks,
Susil

is there a possibility pass the below property?

sonar.branch

Cloud we pass it as below?

sonar.projectKey=projectKey:develop

Hi Susil,

I don’t understand what you’re trying to do. Could you provide some details?

 
Ann

Hi Ann,

we were using Version 5.6.7 for code analysis in CI for PRs now trying to migrate to “Community Edition Version 8.9.6 (build 50800)”

The below issues we are facing:
Issue 1: we have custom code in different location for which we want the analysis to run.
because of that we are trying to use below property
sonar.projectBaseDir=/home/jenkins/workspace
and we are getting the error as posted in logs.

SonarDirectoryLogs.txt (14.0 KB)

Issue 2: is there any option to pass the branch for analysis?
we have tried using ant -Dsonar.branch=${branch} sonarcheck -v but it fails to analyze and ask to remove the sonar.brach property.

Hi,

Welcome to the community!

It’s a pretty big jump from 5.6.7 to 8.9.6. Congratulations on making it! And did you also upgrade the scanner? I don’t remember any breaking changes off-hand, but that could be part of it.

On the other hand, the last Caused by in your stacktrace is this:

Caused by: The base directory of the module 'core' does not exist: /home/jenkins/workspace/Repositories_Hybris-B2C_PR-12733/platform/ext/core

So… first of all, does that directory exist? Does the user running analysis have read/write permissions to it?

 
Ann