Graylog2 / graylog2-server

Free and open log management
https://www.graylog.org
Other
7.33k stars 1.05k forks source link

Graylog 4.2 + Java 11 = WARNING: sun.reflect.Reflection.getCallerClass is not supported. #11634

Closed chi-miel closed 2 years ago

chi-miel commented 2 years ago

Expected Behavior

Unsupported classes should not be used.

Current Behavior

Running Graylog 4.2 with Java 11 generates following Warning

WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by retrofit2.Platform (file:/usr/share/graylog-server/graylog.jar) to constr>
WARNING: Please consider reporting this to the maintainers of retrofit2.Platform
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

Possible Solution

Steps to Reproduce (for bugs)

  1. Upgrade Graylog to 4.2 with Java 11
  2. Start service
  3. Check service status

Context

Your Environment

chi-miel commented 2 years ago

Seem same problem : https://github.com/Graylog2/graylog2-server/issues/9802 https://github.com/Graylog2/graylog2-server/issues/7223

bernd commented 2 years ago

@chi-miel This is just a warning message and shouldn't cause any problems. In this case this is related to the retrofit library. The warning will disappear when the library fixes the reflective access.

maktas commented 1 year ago

The warning message is still being shown in Graylog 5 with default java version in that package: openjdk 17.0.6

Aug 24 11:30:03 systemd[1]: Started Graylog server. Aug 24 11:30:04 graylog-server[11733]: WARNING: sun.reflect.Reflection.getCallerClass is not supported. >