Open n2o opened 4 years ago
Adding a dependency seems to also be the correct fix per JEP 320, though [javax.activation/javax.activation-api "1.2.0"]
is suggested.
The JavaMail API still uses javax.activation.DataHandler legitimately.
So I shouldn't have issues with postal an JDK > 8 if I add that dependency?
Would a solution for postal be to include that library or to include a mention in the README?
We've been using the dependency and postal in production since May, and have had no issues.
I'm not sure if adding the dependency in postal itself causes issues in JDK 8 but it's what I would do.
Even after adding [com.sun.activation/javax.activation "1.2.0"]
as a dependency, when I call send-message
I get this:
2. Unhandled clojure.lang.Compiler$CompilerException
Error compiling postal/message.clj at (1:1)
#:clojure.error{:phase :compile-syntax-check,
:line 1,
:column 1,
:source "postal/message.clj"}
1. Caused by java.lang.ClassNotFoundException
javax.mail.Message
[stacktrace....]
java --version
openjdk 16.0.2 2021-07-20
OpenJDK Runtime Environment Homebrew (build 16.0.2+0)
OpenJDK 64-Bit Server VM Homebrew (build 16.0.2+0, mixed mode, sharing)
In JDK9+, DataHandler appears to be dropped. Therefore, an error is thrown:
To add a workaround, one can add this dependency to your project:
[com.sun.activation/javax.activation "1.2.0"]
Tested with AdoptOpenJDK 13
But this is just a workaround. Please update the corresponding lines in the code base.
Thanks!