Sonar Gradle - Failed to parse entry in bootstrap index

SonarQube Version 6.7.7 (build 38951)
Gradle version - Gradle wraper 5.4.1
sonarqube-gradle-plugin - 2.7.1
Java - 8
Before jumping to gradle config, I am trying to configure gradle task - sonarqube to run sonarqube analysis on one of our sonar servers. I run into below exception

Caused by: java.lang.IllegalStateException: Fail to parse entry in bootstrap index: window[‘adrum-start-time’]… - Refer attachment for detailed log.error-log.txt (13.6 KB)

gradle.properties - only config related to sonar plugin.

project.tasks[“sonarqube”].dependsOn “test”
sonarqube {
properties {
property ‘sonar.projectName’, ‘SonarQube Scanner for TestingV’
property “sonar.sourceEncoding”, “UTF-8”
property “sonar.sources”,“src/main/java”
property “sonar.tests”,“src/test/java”
property “sonar.language”,“java”
property “sonar.sourceEncoding”, “UTF-8”
property “sonar.jacoco.reportPath”, “{project.buildDir}/jacoco/test.exec" property "sonar.groovy.jacoco.reportPath", "{project.buildDir}/jacoco/test.exec”
}
}

jacoco {
toolVersion = “0.8.3”
reportsDir = file("$buildDir/customJacocoReportDir")
}

jacocoTestReport {
reports {
xml.enabled true
html.enabled true
csv.enabled false
html.destination file("${buildDir}/jacocoHtml")
}
}

$ gradlew sonarqube --stacktrace

I have looked into Fail to parse entry in bootstrap index returned from sonar-scanner, but the solution is relative to the issue.

I can access https:///sonar/batch/index, I can see “sonar-scanner-engine-shaded-6.7.7.jar|554ff35562edf806e8bd8aaf0eb485a9” content. not sure whats leading to parse exception.

Thanks in advance.

Hi,

Your analysis log shows that an html page is returned from the URL that’s called. You should double-check the configuration of your server URL/location that’s passed to the scanner. I’m willing to bet the URL you pinged manually isn’t the one the scanner is hitting.

 
Ann

@ganncamp, You are right, I figured out the issue. It was issue with URL, white space at the end of URL was causing the issue, as the host URL was defined in .properties file I couldn’t figure out until I selected the complete URL for copy. also its import the below two properties matches whats defined in Sonar, was missing in my case.

property “sonar.projectKey”, “”
property “sonar.projectName”, “”

Thank you! Small mistake, wasted so much time in debugging the issue.

1 Like