riemann-clojure-client icon indicating copy to clipboard operation
riemann-clojure-client copied to clipboard

Java 10 + "illegal reflective access operation has occurred"

Open pmspire opened this issue 6 years ago • 0 comments

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 https://github.com/protocolbuffers/protobuf/issues/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.

pmspire avatar Apr 12 '19 17:04 pmspire