Skip to content

Illegal Reflective Access in Java 10 #3729

Closed

Description

@jrdoane

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

Activity

  1. elharo commented on Sep 26, 2018

    @elharo
    Contributor

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

  2. jrdoane commented on Sep 26, 2018

    @jrdoane
    Author

    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

  3. jrdoane commented on Sep 26, 2018

    @jrdoane
    Author

    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"]

  4. elharo commented on Sep 26, 2018

    @elharo
    Contributor

    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.

  5. added
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    on Sep 26, 2018
  6. Mistic92 commented on Sep 30, 2018

    @Mistic92

    As JDK11 is GA support should be considered

  7. added
    priority: p2Moderately-important priority. Fix may not be included in next release.
    on Oct 1, 2018
  8. self-assigned this
    on Nov 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions