Issue when integrating Sonarcloud with jenkins

Hi Team

We recently moved to sonar cloud and we configured to trigger sonar cloud with a pull request in bitbucket
but fro jenkins end we can see a failure and jenkins job log as below (error stack only)

INFO: Indexing files…
INFO: Project configuration:
INFO: Excluded sources: .github//*, .vscode//, bin/**/, docs//*, etc//, include/**/, lib//*, repository//, share/**/, .dockerignore, .gitignore, Dockerfile,, requirements.txt,, assets/**/*
INFO: 226 files indexed
INFO: 0 files ignored because of inclusion/exclusion patterns
INFO: 0 files ignored because of scm ignore settings
INFO: Quality profile for java: Sonar way
INFO: Quality profile for xml: Sonar way
INFO: ------------- Run sensors on module src-menu-api
INFO: Load metrics repository
INFO: Load metrics repository (done) | time=98ms
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by net.sf.cglib.core.ReflectUtils$1 (file:/ebs/home/builduser/.sonar/cache/a89f1943fc75b65becd9fb4ecab8d913/sonar-tsql-plugin.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte,int,int,
WARNING: Please consider reporting this to the maintainers of net.sf.cglib.core.ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
INFO: Sensor JavaSquidSensor [java]
INFO: Configured Java source version ( none
INFO: JavaClasspath initialization
INFO: ------------------------------------------------------------------------
INFO: ------------------------------------------------------------------------
INFO: Total time: 13.821s
INFO: Final Memory: 27M/94M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarQube Scanner execution
ERROR: Please provide compiled classes of your project with property
ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
WARN: Unable to locate ‘report-task.txt’ in the workspace. Did the SonarScanner succeeded?
ERROR: SonarQube scanner exited with non-zero code: 1
Finished: FAILURE

@Randika_Munasingha looks like in your case you’re just missing your Java *.class files:

ERROR: Please provide compiled classes of your project with property

Typically is set to something like target/classes,target/test-classes.

1 Like