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

Java 10 + "illegal reflective access operation has occurred" #43

Open
pmspire opened this issue Apr 12, 2019 · 0 comments
Open

Java 10 + "illegal reflective access operation has occurred" #43

pmspire opened this issue Apr 12, 2019 · 0 comments

Comments

@pmspire
Copy link

pmspire commented Apr 12, 2019

When running a simple riemann-clojure-client client under Java 10, I see these warnings:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.protobuf.UnsafeUtil (file:/home/pmadden/.m2/repository/com/google/protobuf/protobuf-java/3.5.1/protobuf-java-3.5.1.jar) to field java.nio.Buffer.address
WARNING: Please consider reporting this to the maintainers of com.google.protobuf.UnsafeUtil
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

I suppose that this might be related to protocolbuffers/protobuf#3781, and might be fixed in a newer protocolbuffers release. I also suspect that this might be more appropriate to riemann-java-client, but I'm not sure.

Steps to reproduce:

  1. Start up a default Riemann server as described in http://riemann.io/quickstart.html, up to and including the bin/riemann etc/riemann.config command.
  2. Do lein run in this directory:
% tree
.
├── project.clj
└── src
    └── foo
        └── core.clj

% cat project.clj 
(defproject foo "0"
  :dependencies [[org.clojure/clojure "1.8.0"]
                 [riemann-clojure-client "0.5.0"]]
  :main ^:skip-aot foo.core)

% cat src/foo/core.clj 
(ns foo.core
  (:gen-class)
  (:require [riemann.client :as rc]))

(defn -main
  []
  (rc/send-event (rc/tcp-client {:host "127.0.0.1" :tls? false}) {}))

If I add an explicit [com.google.protobuf/protobuf-java "3.7.1"] dependency to my project.clj, the warnings disappear -- though I don't know yet if the Riemann client will function correctly with this version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant