Jacoco.exec or java .class files are not detected by sonar scanner - throwing indexed with language 'null'

I am trying to set up pipeline which includes calculating code coverage using jacoco and pushing to sonarqube dashboard for my Functional Test cases.

I have copied the jacoco.exec file and all class files from my application server to jenkin server and trying to do sonar analysis. The sonar scanner identifies all class files but it is not detecting as java file even after passing the sonar.java.binaries properties correctly

+ /var/lib/jenkins/tools/hudson.plugins.sonar.SonarRunnerInstallation/SonarQubeScanner/bin/sonar-scanner -Dsonar.verbose=true -Dsonar.projectKey=checkout-service -Dsonar.projectName=checkout-service -Dsonar.projectBaseDir=/var/lib/jenkins/jobs/checkout-service-Pipeline/builds/149 -Dsonar.scm.disabled=true -Dsonar.java.binaries=/jacoco/classes -Dsonar.jacoco.reportPath=/jacoco/execFiles/exec0/jacoco.exec -Dsonar.dynamicAnalysis=reuseReports -Dsonar.java.coveragePlugin=jacoco -Dsonar.dynamicAnalysis=reuseReports -Dsonar.exclusions=**/*.html,**/*.xml -Dsonar.jacoco.reportMissing.force.zero=true 

19:54:25.662 DEBUG: 'jacoco/execFiles/exec0/jacoco.exec' indexed with language 'null'
19:54:25.664 DEBUG: 'jacoco/classes/com/XXX/jackson/serializer/TimeStampSerializer.class' indexed with language 'null'

19:54:27.643 DEBUG: Sensors : JaCoCo XML Report Importer -> JavaXmlSensor -> HTML
19:54:27.643 INFO: Sensor JaCoCo XML Report Importer [jacoco]
19:54:27.652 DEBUG: No reports found
19:54:27.653 INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=10ms
19:54:27.653 INFO: Sensor JavaXmlSensor [java]
19:54:27.674 INFO: Sensor JavaXmlSensor [java] (done) | time=21ms
19:54:27.674 INFO: Sensor HTML [web]
19:54:27.684 INFO: Sensor HTML [web] (done) | time=10ms
19:54:27.686 INFO: ------------- Run sensors on project
19:54:27.688 DEBUG: 'Generic Coverage Report' skipped because one of the required properties is missing
19:54:27.689 DEBUG: 'Java CPD Block Indexer' skipped because there is no related file in current project
19:54:27.690 DEBUG: Sensors : Zero Coverage Sensor
19:54:27.690 INFO: Sensor Zero Coverage Sensor
19:54:27.700 INFO: Sensor Zero Coverage Sensor (done) | time=10ms
19:54:27.701 INFO: SCM Publisher is disabled
19:54:27.702 INFO: CPD Executor Calculating CPD for 0 files
19:54:27.703 INFO: CPD Executor CPD calculation finished (done) | time=0ms
19:54:27.766 INFO: Analysis report generated in 63ms, dir size=75 KB
19:54:27.779 INFO: Analysis report compressed in 13ms, zip size=9 KB
19:54:27.779 INFO: Analysis report generated in /var/lib/jenkins/jobs/checkout-service-Pipeline/builds/149/.scannerwork/scanner-report
19:54:27.779 DEBUG: Upload report
19:54:27.796 DEBUG: POST 200 | time=16ms
19:54:27.798 INFO: Analysis report uploaded in 19ms
19:54:27.799 DEBUG: Report metadata written to /var/lib/jenkins/jobs/checkout-service-Pipeline/builds/149/.scannerwork/report-task.txt
19:54:27.799 INFO: ANALYSIS SUCCESSFUL, you can browse
19:54:27.799 INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
19:54:27.799 INFO: More about the report processing at
19:54:27.801 DEBUG: Post-jobs : 
19:54:27.803 INFO: Analysis total time: 3.859 s
19:54:27.804 INFO: ------------------------------------------------------------------------
19:54:27.804 INFO: ------------------------------------------------------------------------
19:54:27.805 INFO: Total time: 5.093s
19:54:27.898 INFO: Final Memory: 21M/561M
19:54:27.898 INFO:

hello @jagan_nathan,

you don’t need to copy exec file and classes. It would be easier to import XML report for coverage. I’ve written detailed post how to do it here [Coverage & Test Data] Importing JaCoCo coverage report in XML format

Import of jacoco.exec coverage was dropped in sonar-java 6.0