WARNING: Illegal reflective access by datadog.trace.instrumentation.java.concurrent.NewTaskFor
The following warnings have started appearing in the start up log of our java application
WARNING: All illegal access operations will be denied in a future release WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: Please consider reporting this to the maintainers of datadog.trace.instrumentation.java.concurrent.NewTaskFor WARNING: Illegal reflective access by datadog.trace.instrumentation.java.concurrent.NewTaskFor to method java.util.concurrent.AbstractExecutorService.newTaskFor(java.lang.Runnable,java.lang.Object) WARNING: An illegal reflective access operation has occurred
We include the dd-java-agent as described here https://docs.datadoghq.com/tracing/setup_overview/setup/java/?tab=containers
The application is executing a spring boot application using spring-boot-starter-parent 2.2.9.RELEASE
It is running inside a docker container extending openjdk:11-jre-slim-buster
We have not previously seen these warnings
Getting the same error with version 0.67.0:
[dd.trace 2020-11-12 07:42:31:175 -0800] [main] INFO datadog.trace.agent.tooling.AgentInstaller - Class instrumentation installed WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by datadog.trace.instrumentation.java.concurrent.NewTaskFor to method java.util.concurrent.AbstractExecutorService.newTaskFor(java.lang.Runnable,java.lang.Object) WARNING: Please consider reporting this to the maintainers of datadog.trace.instrumentation.java.concurrent.NewTaskFor 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 [dd.trace 2020-11-12 07:42:31:773 -0800] [main] INFO datadog.trace.agent.core.StatusLogger - DATADOG TRACER CONFIGURATION {"version":"0.67.0~9daf9ffe6","os_name":"Mac OS X","os_version":"10.15.7","architecture":"x86_64","lang":"jvm","lang_version":"11.0.7","jvm_vendor":"AdoptOpenJDK","jvm_version":"11.0.7+10","java_class_version":"55.0","http_nonProxyHosts":"local|.local|169.254/16|.169.254/16","http_proxyHost":"null","enabled":true,"service":"jamacore","agent_url":"http://192.168.1.38:8126","agent_error":false,"debug":false,"analytics_enabled":false,"sampling_rules":[{},{}],"priority_sampling_enabled":true,"logs_correlation_enabled":false,"profiling_enabled":false,"dd_version":"0.67.0~9daf9ffe6","health_checks_enabled":true,"configuration_file":"no config file present","runtime_id":"3b395f23-0e1d-4448-9d75-b5e3c255e999"}
We're also seeing this, and here's our DD java agent config if that helps:
[dd.trace 2020-11-16 21:56:03:867 +0000] [main] INFO datadog.trace.agent.core.StatusLogger - DATADOG TRACER CONFIGURATION
{
"version": "0.67.0~9daf9ffe6",
"os_name": "Linux",
"os_version": "4.14.193-149.317.amzn2.x86_64",
"architecture": "amd64",
"lang": "jvm",
"lang_version": "11.0.2",
"jvm_vendor": "Oracle Corporation",
"jvm_version": "11.0.2+9-Debian-3bpo91",
"java_class_version": "55.0",
"http_nonProxyHosts": "null",
"http_proxyHost": "null",
"enabled": true,
"service": "clojure.main",
"agent_url": "http://localhost:8126",
"agent_error": true,
"debug": false,
"analytics_enabled": false,
"sampling_rules": [
{},
{}
],
"priority_sampling_enabled": true,
"logs_correlation_enabled": false,
"profiling_enabled": false,
"dd_version": "0.67.0~9daf9ffe6",
"health_checks_enabled": true,
"configuration_file": "no config file present",
"runtime_id": "412742c5-6cbb-4a99-925c-e24699e69b7e"
}
Seeing a similar error
WARNING: Illegal reflective access by datadog.trace.instrumentation.java.concurrent.NewTaskFor to method java.util.concurrent.AbstractExecutorService.newTaskFor(java.lang.Runnable,java.lang.Object)
Any update on how to fix that issue?
A fix is in progress. Note that this JDK warning doesn't have any functional impact on either the application or the tracer and can be safely ignored. Recent JDKs output this warning as a reminder to migrate from the older reflection API to alternative approaches.
You can remove this warning by adding the following JVM option:
--add-opens java.base/java.util.concurrent=ALL-UNNAMED
FYI, I've merged a fix for this warning in #2199 which will be in the next release (0.70.0)
:robot: This issue has been addressed in the latest release. See full details in the Release Notes.