Did you find any solution regarding this?
I am experiencing the same issue which only fails when deployed on the development/production environment but works on my local machine.
I have one particular use case which is running the mail sending process asynchronously.
final Runnable callback = // Some method which provides a callback that sends a mail
final CompletableFuture<Void> notifyUsersFuture = CompletableFuture.runAsync(callback).exceptionally(throwable -> {
LOGGER.error(throwable.getMessage());
return null;
});
Other use cases which do not send email asynchronously seem to be working fine.