WARNING: An illegal reflective access operation has occurred

When I run sonar-scanner:

// …
INFO: Load metrics repository (done) | time=19ms
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by net.sf.cglib.core.ReflectUtils$1 (file:/home/uwesome-user-name/.sonar/cache/13ad013e7b135beb25756efaa4e75337/sonar-javascript-plugin.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte,int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of net.sf.cglib.core.ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
INFO: Sensor SonarCSS Rules [cssfamily]
// …

1 Like

Hi,

What version of SonarQube are you using?

 
Ann

I see this too with Sonarqube 8.5

**18:12:53** [ **INFO** ] JavaScript/TypeScript frontend is enabled 
**18:12:53** [ **INFO** ] Load metrics repository 
**18:12:53** [ **INFO** ] Load metrics repository (done) | time=24ms 
**18:12:54** WARNING: An illegal reflective access operation has occurred 
**18:12:54** WARNING: Illegal reflective access by net.sf.cglib.core.ReflectUtils$1 (file:/home/jenkins/agent/workspace/FIT_flores-dlm_release_1.0.0-rc2/.sonar/cache/a89f1943fc75b65becd9fb4ecab8d913/sonar-tsql-plugin.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) 
**18:12:54** WARNING: Please consider reporting this to the maintainers of net.sf.cglib.core.ReflectUtils$1 
**18:12:54** WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations 
**18:12:54** WARNING: All illegal access operations will be denied in a future release 
**18:12:55** [ **INFO** ] Sensor JavaSquidSensor [java] 
**18:12:55** [ **INFO** ] Configured Java source version (sonar.java.source): 11

hello Michael, @LocalHeroPro,

this warning comes from Java that in some future (not yet released) version of Java some parts of SonarQube will not work correctly. It doesn’t affect SonarQube on current Java in any way, and you can safely ignore it.

We are going to modify SonarQube to be compatible with this upcoming change in Java runtime, however since this is not affecting users in any way, and this breaking change in Java will not come any time soon, it was not our priority. You might expect the warning to disappear in some future version (maybe already the next one).

1 Like

Hi Tibor,

I understand the reason of this warning and even if it is not affecting the quality, it does affect the quality of the CI pipeline if you follow a zero warning policy of your build logs.
You either have to accept warnings or add extra suppression.

Kind regards,
Michael

1 Like
  • Community Edition
  • Version 8.4.2 (build 36762)
    brand new install.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.