Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Illegal Reflective Access in Java 10 #3729

Closed
jrdoane opened this issue Sep 26, 2018 · 5 comments
Closed

Illegal Reflective Access in Java 10 #3729

jrdoane opened this issue Sep 26, 2018 · 5 comments
Assignees
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@jrdoane
Copy link

jrdoane commented Sep 26, 2018

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

@elharo
Copy link
Contributor

elharo commented Sep 26, 2018

That's a really old version. Can you try in 0.62.0-alpha and see if it still happens?

@jrdoane
Copy link
Author

jrdoane commented Sep 26, 2018

The latest version in Maven Central is 0.42.0-alpha which is why I'm using it. I'm using the artifact link described in the README. Is this not the correct one to be using?
https://search.maven.org/search?q=g:com.google.cloud%20a:google-cloud

@jrdoane
Copy link
Author

jrdoane commented Sep 26, 2018

I also tried using these two dependencies instead of the 0.42.0-alpha for the "all-in-one" artifact with the same result:
[com.google.cloud/google-cloud-datastore "1.45.0"]
[com.google.cloud/google-cloud-logging "1.45.0"]

@elharo
Copy link
Contributor

elharo commented 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.

@elharo elharo added the triage me I really want to be triaged. label Sep 26, 2018
@chingor13 chingor13 added the type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. label Sep 26, 2018
@Mistic92
Copy link

As JDK11 is GA support should be considered

@JustinBeckwith JustinBeckwith added the 🚨 This issue needs some love. label Oct 1, 2018
@chingor13 chingor13 added the priority: p2 Moderately-important priority. Fix may not be included in next release. label Oct 1, 2018
@JustinBeckwith JustinBeckwith removed triage me I really want to be triaged. 🚨 This issue needs some love. labels Oct 1, 2018
@chingor13 chingor13 self-assigned this Nov 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

5 participants