Sonar scanner not scanning my code, i have trying sonarQube scanning with gitHub actions

  1. Im using the SonarQube version 7.6 and its been deployed on AMAZON LINUX EC2 instance
  2. I have installed Java 11 version for this.
  3. I have my node project in Serverless framework.
  4. I have my own github action file for my CI/CD integration
  5. In that file i have configured the one of the job for. the sonarQube
  6. I have my sonar-project.properties file in root level
  7. Below is my job for the sonarQube in github/workflow/dev.yml

Note: I have configured the sonarQube 7.6 version in EC2 instance and that is up and running and i can able to generate token and i have given that token in Github secrets as well

 sonarqube:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
      with:
        # Disabling shallow clones is recommended for improving the relevancy of reporting
        fetch-depth: 0
    - name: SonarQube Scan
      uses: sonarsource/sonarqube-scan-action@master
      env:
        SONAR_TOKEN: ${{ secrets.sonar_token }}
        SONAR_HOST_URL: ${{ secrets.sonar_url }}

When ever i trying to push into my branch this job get started successfully.

After few seconds this jobs gets field

Then i got below error.

NFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------

INFO: Total time: 24.542s

ERROR: Error during SonarScanner execution

INFO: Final Memory: 11M/40M

INFO: ------------------------------------------------------------------------

java.lang.ExceptionInInitializerError

Caused by: net.sf.cglib.core.CodeGenerationException: java.lang.reflect.InaccessibleObjectException–>Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte,int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not “opens java.lang” to unnamed module
ERROR:
ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.

Please guide me to get sort it out.

Hi,

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:

7.6 → 7.9 → 8.9.10 → 9.9.4 → 10.4 (last step optional)

You may find these resources 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.