# WARNING: sun.reflect.Reflection.getCallerClass is not supported

**URL:** <https://community.graylog.org/t/warning-sun-reflect-reflection-getcallerclass-is-not-supported/22289>\
**Category:** Graylog Central (peer support)\
**Created:** [January 10, 2022, 11:51pm UTC](https://community.graylog.org/t/warning-sun-reflect-reflection-getcallerclass-is-not-supported/22289 "2022-01-10T23:51:41Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![gsmith](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/gsmith/32/1222_2.png) [@gsmith](https://community.graylog.org/u/gsmith)\
**Post date:** [January 11, 2022, 12:47am UTC](https://community.graylog.org/t/warning-sun-reflect-reflection-getcallerclass-is-not-supported/22289/2 "2022-01-11T00:47:19Z")

</div>

Hello,

I have seen that issue here

> <https://github.com/Graylog2/graylog2-server/issues/7223>
>
> When using OpenJDK 11 on CentOS 7, I see warnings about illegal reflective acces…s operations that show up after startup.
> 
> Output from systemctl -l status graylog-server:
> \`\`\`
> ● graylog-server.service - Graylog server
> Loaded: loaded (/usr/lib/systemd/system/graylog-server.service; enabled; vendor preset: disabled)
> Active: active (running) since Wed 2020-01-15 00:35:06 CST; 3 days ago
> Docs: http://docs.graylog.org/
> Main PID: 17354 (graylog-server)
> CGroup: /system.slice/graylog-server.service
> ├─17354 /bin/sh /usr/share/graylog-server/bin/graylog-server
> └─17356 /usr/bin/java -Xms2g -Xmx2g -XX:NewRatio=1 -server -XX:+ResizeTLAB -XX:+CMSConcurrentMTEnabled -XX:+CMSClassUnloadingEnabled -XX:-OmitStackTraceInFastThrow -jar -Dlog4j.configurationFile=file:///etc/graylog/server/log4j2.xml -Djava.library.path=/usr/share/graylog-server/lib/sigar -Dgraylog2.installation\_source=rpm /usr/share/graylog-server/graylog.jar server -f /etc/graylog/server/server.conf -np
> 
> Jan 15 00:35:06 graylog systemd\[1\]: Started Graylog server.
> Jan 15 00:35:07 graylog graylog-server\[17354\]: WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.
> Jan 15 00:35:12 graylog graylog-server\[17354\]: WARNING: An illegal reflective access operation has occurred
> Jan 15 00:35:12 graylog graylog-server\[17354\]: WARNING: Illegal reflective access by com.google.inject.assistedinject.FactoryProvider2$MethodHandleWrapper (file:/usr/share/graylog-server/graylog.jar) to constructor java.lang.invoke.MethodHandles$Lookup(java.lang.Class,int)
> Jan 15 00:35:12 graylog graylog-server\[17354\]: WARNING: Please consider reporting this to the maintainers of com.google.inject.assistedinject.FactoryProvider2$MethodHandleWrapper
> Jan 15 00:35:12 graylog graylog-server\[17354\]: WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
> Jan 15 00:35:12 graylog graylog-server\[17354\]: WARNING: All illegal access operations will be denied in a future release
> \`\`\`
> 
> \## Context
> I have not done any testing on this and the service seems to startup and run.
> 
> \## Your Environment
> Graylog server 3.1.4+1149fe1
> JRE: Oracle Corporation 11.0.5 on Linux 3.10.0-1062.9.1.el7.x86\_64
> Deployment: rpm
> OS: CentOS Linux 7 (Core) (centos)
> Arch: amd64

> [@Graylog starts but browser shows apache default page](https://community.graylog.org/t/graylog-starts-but-browser-shows-apache-default-page/15239):
>
> systemctl status graylog-server.service shows a warning: graylog-server.service - Graylog server Loaded: loaded (/lib/systemd/system/graylog-server.service; enabled; vendor preset: enabled) Active: active (running) since Sun 2020-05-03 17:47:38 CEST; 4min 18s ago Docs: [http://docs.graylog.org/](http://docs.graylog.org/) Main PID: 8790 (graylog-server) Tasks: 105 (limit: 4662) Memory: 774.3M CGroup: /system.slice/graylog-server.service ├─8790 /bin/sh /usr/share/graylog-server/bin/graylog-server └─8809 /usr/bin/ja…

> <https://github.com/Graylog2/graylog2-server/issues/11634>
>
> \## Expected Behavior
> Unsupported classes should not be used.
> 
> \## Current Beha…vior
> 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
> 
> \* Graylog Version: 4.2
> \* Java Version: openjdk version "11.0.13" 2021-10-19 LTS
> \* Operating System: CentOS Linux release 8.4.2105

[https://coderedirect.com/questions/347020/is-log4j2-compatible-with-java-11](https://coderedirect.com/questions/347020/is-log4j2-compatible-with-java-11)

Hope that helps

---

_[View the full topic](https://community.graylog.org/t/warning-sun-reflect-reflection-getcallerclass-is-not-supported/22289)._
