- Im using the SonarQube version 7.6 and its been deployed on AMAZON LINUX EC2 instance
- I have installed Java 11 version for this.
- I have my node project in Serverless framework.
- I have my own github action file for my CI/CD integration
- In that file i have configured the one of the job for. the sonarQube
- I have my sonar-project.properties file in root level
- 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.