Upgrade Jakarta Mail and Greenmail
- Dominant language
- Clojure
- Stars
- 66
- Forks
- 28
- Avg merge
- 7d 4h
- Merged PRs (30d)
- 2
Description
New major releases available, but attempting to upgrade causes tests to fail
**greenmail v. 2.0.1:**
`lein kaocha :unit :integration`
```
ERROR in integration (load.clj:47)
Failed loading tests:
Exception: java.lang.NullPointerException: Cannot invoke "Object.hashCode()" because "key" is null
at java.util.concurrent.ConcurrentHashMap.get (ConcurrentHashMap.java:948)
...
ERROR in unit (ns.clj:9)
Failed loading tests:
Exception: clojure.lang.Compiler$CompilerException: Syntax error compiling new at (rems/email/test_core.clj:117:16).
#:clojure.error{:phase :compile-syntax-check, :line 117, :column 16, :source "rems/email/test_core.clj", :symbol new}
at clojure.lang.Compiler.analyzeSeq (Compiler.java:7695)
...
(Rest of stacktrace elided)
Caused by: java.lang.NoClassDefFoundError: jakarta/mail/MessagingException
at java.lang.Class.getDeclaredConstructors0 (Class.java:-2)
...
(Rest of stacktrace elided)
Caused by: java.lang.ClassNotFoundException: jakarta.mail.MessagingException
at jdk.internal.loader.BuiltinClassLoader.loadClass (BuiltinClassLoader.java:580)
...
(Rest of stacktrace elided)
2 tests, 2 assertions, 2 errors, 0 failures.
```
**greenmail v. 2.1.8:**
`lein kaocha :unit :integration`
```
FAIL in rems.email.test-core/test-smtp-configuration (test_core.clj:154)
ERROR in rems.email.test-core/test-smtp-configuration (test_core.clj:155)
FAIL in rems.email.test-core/test-send-email!-mock-smtp (test_core.clj:129)
ERROR in rems.email.test-core/test-send-email!-mock-smtp (test_core.clj:130)
ERROR in rems.email.test-core/test-send-email!-mock-smtp (test_core.clj:131)
ERROR in rems.email.test-core/test-send-email!-mock-smtp (test_core.clj:132)
╭───── Test output ───────────────────────────────────────────────────────
│ ...
│ javax.mail.NoSuchProviderException: smtp
....
403 tests, 4356 assertions, 4 errors, 2 failures.
```
Upgrading Jakarta mail to 2.0.2 results in the same errors
Contributor guide
Research direction
Run `lein kaocha :unit :integration` and inspect the failures in rems/email/test_core.clj, especially lines 117, 129-155, plus the integration loading error at load.clj:47. Trace the Jakarta Mail and GreenMail dependency declarations and their compatibility, then confirm that both test suites pass with the upgraded versions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend, testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100