riemann/riemann

amazonica throws RuntimeException on jdk 17/18

nukemberg opened this issue · 0 comments

Describe the bug
amazonica dependency in Riemann doesn't work properly with JDK17

To Reproduce
lein repl

clj꞉riemann-config.core꞉> 
(require '[amazonica.aws.simpleemail :as ses])
(ses/send-email {:destination {:to-addresses ["[some@email.addresss.com](mailto:some@email.addresss.com)"]} :source "[test@example.com](mailto:test@example.com)" :message {:subject "test" :body {:text "test email from riemann repl"}}})
; RuntimeException Failed to create an instance of com.amazonaws.services.simpleemail.model.Destination from {:to-addresses ["[some@email.addresss.com](mailto:some@email.addresss.com)"]} due to clojure.lang.ExceptionInfo: Error setting :to-addresses: class clojure.lang.Reflector cannot access class sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl (in module java.base) because module java.base does not export sun.reflect.generics.reflectiveObjects to unnamed module @66e707f. Perhaps the value isn't compatible with the setter? {:property :to-addresses, :value ["[some@email.addresss.com](mailto:some@email.addresss.com)"]}. Make sure the data matches an existing constructor and setters.  amazonica.core/unmarshall (core.clj:578)

Expected behavior
email should be sent without error

Background (please complete the following information):

  • Java/JVM version 17, 18
  • Riemann version 0.3.8

Additional context
JDK 17 removed illegal access exemptions. See here for details.