question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Illegal Reflective Access in Java 10

See original GitHub issue

When using [com.google.cloud/google-cloud "0.47.0-alpha"] in Clojure [org.clojure/clojure "1.9.0"] using openjdk version "10.0.2" 2018-07-17, when my application starts, I receive the following warnings from the JVM:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by io.grpc.netty.shaded.io.netty.util.internal.ReflectionUtil (file:/usr/local/bin/lrm-logging-service.jar) to constructor java.nio.DirectByteBuffer(long,int)
WARNING: Please consider reporting this to the maintainers of io.grpc.netty.shaded.io.netty.util.internal.ReflectionUtil
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

The project producing this error is using the following class imports from the Google Cloud library:

com.google.cloud.datastore: Key KeyFactory Datastore DatastoreOptions com.google.cloud.logging: Logging Logging$WriteOption LoggingOptions LogEntry Payload Payload$JsonPayload com.google.cloud: MonitoredResource

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Mistic92commented, Sep 30, 2018

As JDK11 is GA support should be considered

0reactions
elharocommented, Sep 26, 2018

Off the top of my head, I’m not sure what the com.google.cloud:google-cloud artifact is. Wherever it comes from, it hasn’t been updated since May. If 1.45.0 is failing, we probably need to take a look at this. I’m not sure what our official stance on Java 9 and 10 support is.

It looks like the issue comes from deep inside Netty:

WARNING: Please consider reporting this to the maintainers of io.grpc.netty.shaded.io.netty.util.internal.ReflectionUtil

so that’s where the initial fix needs to go followed by an upgrade to our dependency here.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is an illegal reflective access? - java - Stack Overflow
The first reflective-access operation to any such package causes a warning to be issued, but no warnings are issued after that point. This ......
Read more >
Java 9 Illegal Reflective Access Warning - Baeldung
Before Java 9, the Java Reflection API has a superpower: It could gain access to the non-public class members without limitation.
Read more >
How to fix “an illegal reflective access operation has occurred”
The "an illegal reflective access operation has occurred" warning message is related to the unauthorized access to parts of the JDK made by ......
Read more >
An illegal reflective access operation has occurred when ...
You will see An illegal reflective access operation has occurred warning when installing and using AM (including Amster and ssoadm tools), Java ......
Read more >
"illegal reflective access" under Java 9, 10, 11 - Shibboleth
This is something of a placeholder to investigate the detailed behaviour. Starting the IdP under Java OpenJDK 9.0.4 or Java 10 EA 46...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found