You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[bug] Mailer.close() exception because it attempts to shutdown batch-module connection pools, even if not available on the classpath #558
It seems that attempting to close a non-asyncMailer (either explicitly via .close() or implicitly via try-with) will cause it to throw a ModuleLoaderException.
Exception in thread "main" org.simplejavamail.internal.moduleloader.ModuleLoaderException: Batch module not found, make sure it is on the classpath (https://github.com/bbottema/simple-java-mail/tree/develop/modules/batch-module)
at org.simplejavamail.internal.moduleloader.ModuleLoader.loadModule(ModuleLoader.java:133)
at org.simplejavamail.internal.moduleloader.ModuleLoader.loadBatchModule(ModuleLoader.java:95)
at org.simplejavamail.mailer.internal.MailerImpl.shutdownConnectionPool(MailerImpl.java:395)
at org.simplejavamail.mailer.internal.MailerImpl.close(MailerImpl.java:474)
at Test.main(Test.java:11)
changed the title [-]`Mailer::close` attempts to access the batch module regardless of configuration[/-][+][bug] Mailer.close() exception because it attempts to shutdown batch-module connection pools, even if not available on the classpath[/+]on Dec 12, 2024
Activity
bbottema commentedon Oct 17, 2024
I thought I was had addressed this recently. I'll have a look.
#558: Only close connection pool from batch-module, if batch-module h…
[-]`Mailer::close` attempts to access the batch module regardless of configuration[/-][+][bug] Mailer.close() exception because it attempts to shutdown batch-module connection pools, even if not available on the classpath[/+]bbottema commentedon Dec 12, 2024
Fix released in 8.12.4.