Visitar URL original
illegal reflective access operation · Issue #235 · googleapis/google-cloud-datastore · GitHub
Skip to content
This repository was archived by the owner on Jan 20, 2026. It is now read-only.
This repository was archived by the owner on Jan 20, 2026. It is now read-only.

illegal reflective access operation #235

Closed

Description

@MorinRemi

com.google.datastore.v1.client.RemoteRpc does an Illegal reflective access when running on Java 11 (and probably any above java 1.8) resulting in error being sent right to system error.

The offensive line is https://github.com/GoogleCloudPlatform/google-cloud-datastore/blob/a23940d0634d7f537faf01ad9e60598046bcb40a/java/datastore/src/main/java/com/google/datastore/v1/client/RemoteRpc.java#L72

You can read more on the JVM modern behaviour here:
http://openjdk.java.net/jeps/261#Relaxed-strong-encapsulation

Full error:
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.datastore.v1.client.RemoteRpc$GzipFixingInputStream (file:/Users/gen06958/.gradle/caches/modules-2/files-2.1/com.google.cloud.datastore/datastore-v1-proto-client/1.6.0/8b2516336fdf191d86d9979588b23cd502aa8f73/datastore-v1-proto-client-1.6.0.jar) to field java.io.FilterInputStream.in
WARNING: Please consider reporting this to the maintainers of com.google.datastore.v1.client.RemoteRpc$GzipFixingInputStream
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

Activity

  1. eddavisson commented on Oct 7, 2019

    @eddavisson
    Contributor

    I posted an update to googleapis/google-http-java-client#367 which would remove the need for this hack entirely.

  2. elharo commented on Oct 30, 2019

    @elharo
    Contributor

    We can fix this but we need a release of google-http-java-client first.

  3. self-assigned this
    on Oct 31, 2019
  4. elharo commented on Oct 31, 2019

    @elharo
    Contributor

    http-java-client released, proceeding

  5. bhautiksutariya commented on Jun 10, 2020

    @bhautiksutariya

    How to fix this? I am using below dependency for datastore
    org.springframework.cloud:spring-cloud-gcp-starter-data-datastore:1.1.2.RELEASE

  6. elharo commented on Jun 10, 2020

    @elharo
    Contributor

    Make sure you're using the latest version of the datastore and http clients. libraries-bom 5.6.0 should give you this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions