Not able to scan java code

Must-share information (formatted with Markdown):

  • Sonarqube server version - 6.7.7
  • Java version - 8
  • I have created a shell script that scans a project and uploads it to a given endpoint. It is working fine with almost all projects but a java project is not scanning with error like -
ERROR: Unable to create symbol table for : 

My script is something like -

echo "sonar.projectKey=$SonarqubeProjectKey" > sonar-project.properties
docker run \
    --rm \
    -e SONAR_HOST_URL=$SonarqubeEndpoint \
    -e SONAR_LOGIN=$SonarqubeApiKey \
    -v "/$PWD:/usr/src" \
    sonarsource/sonar-scanner-cli
  • I need to get the java code scanned too.

Hi,

Welcome to the community!

Your version is past EOL. You should upgrade to either the latest version or the current LTS at your earliest convenience. Your upgrade path is:

6.7.7 → 7.9.6 → 8.9.8 → 9.5 (last step optional)

You may find the Upgrade Guide and the LTS-to-LTS Upgrade Notes helpful. If you have questions about upgrading, feel free to open a new thread for that here.

If your error persists after upgrade, please come back to us.

 
Ann

Can we do this by changing the docker image version or something from the client side? My concern is that the same thing works in a jenkins plugin but not through my script

Can anyone clarify this?