Sonar scan results showing ? for location


We are using Sonarqube 6.1. The scanner we are using for Jenkins is version 2.9. While the jenkins job is able to be completed successfully, the sonar report fails with the following:

{“task”:{“id”:“AXB3RKq9Yy9d2t2yVH28”,“type”:“REPORT”,“componentId”:“AXBjn3ftYy9d2t2yVHxz”,“componentKey”:“name”,“componentName”:“name”,“componentQualifier”:“TRK”,“status”:“FAILED”,“submittedAt”:“2020-02-24T07:55:53-0500”,“submitterLogin”:“admin”,“startedAt”:“2020-02-24T07:55:54-0500”,“executedAt”:“2020-02-24T07:56:01-0500”,“executionTimeMs”:7858,“logs”:false,“errorMessage”:"\n### Error committing transaction. Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.db.issue.IssueMapper.insert (batch index #1) failed. Cause: java.sql.BatchUpdateException: Batch entry 0 INSERT INTO issues (kee, rule_id, severity, manual_severity,\n message, line, locations, gap, effort, status, tags,\n resolution, checksum, assignee, author_login, issue_attributes, issue_creation_date, issue_update_date,\n issue_close_date, created_at, updated_at, component_uuid, project_uuid, issue_type)\n VALUES (‘AXB3RLUZq_BlAUGttbhw’, 703,\n ‘MAJOR’,\n ‘0’, ‘Remove those useless parentheses.’, 5044,\n ?,\n NULL, 1, ‘OPEN’,\n ‘confusing’, NULL, ‘c3b6df98d7b82d73e72f49578f9a889b’,\n NULL, ‘’,\n ‘’,\n 1582548902000,1582548902000, NULL,\n 1582548961722, 1582548961722,\n ‘AXBjn4DOq_BlAUGtsrSX’, ‘AXBjn3ftYy9d2t2yVHxz’, 1) was aborted. Call getNextException to see the cause.\n### Cause: org.apache.ibatis.executor.BatchExecutorExcepti",“hasScannerContext”:true}}

The location is showing up as ? and there is also another error at the bottom. Any suggestions on how to resolve this? I’m aware that the version I am using is very outdated but I cannot upgrade at the moment.

Hey Nizar,

Sonarqube v6.1 has been EOL for a long time (December 2016). There have been 2 new LTS releases since (v6.7 LTS and v7.9 LTS). You should upgrade to a supported version of SonarQube (v7.9 LTS).