That did not solve the problem but curiously it printed this exception to stderr:
Exception in thread “java.lang.ThreadGroup[name=RMI Runtime,maxpri=10]_14” java.lang.NullPointerException
at com.aspose.email.internal.ah.n.a(Unknown Source)
at com.aspose.email.internal.ah.h.a(Unknown Source)
at com.aspose.email.internal.ah.j.run(Unknown Source)
at java.lang.Thread.run(Thread.java:744)
The email was successfully delivered though. I attempted to send another email and that did not print this exception. On stopping the application Tomcat still printed these messages:
25-Oct-2016 21:08:48.201 SEVERE [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@777a98d6]) and a value of type [com.aspose.email.internal.ah.g] (value [com.aspose.email.internal.ah.g@587200be]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
25-Oct-2016 21:08:48.202 SEVERE [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@777a98d6]) and a value of type [com.aspose.email.internal.ah.g] (value [com.aspose.email.internal.ah.g@763975a3]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
25-Oct-2016 21:08:48.203 SEVERE [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@6d62ceca]) and a value of type [com.aspose.email.internal.al.j] (value [com.aspose.email.internal.al.j@4e7d4798]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
25-Oct-2016 21:08:48.203 SEVERE [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@777a98d6]) and a value of type [com.aspose.email.internal.ah.g] (value [com.aspose.email.internal.ah.g@6c2c919]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
25-Oct-2016 21:08:48.203 SEVERE [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@6d62ceca]) and a value of type [com.aspose.email.internal.al.j] (value [com.aspose.email.internal.al.j@3b6b200f]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
25-Oct-2016 21:08:48.203 SEVERE [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@777a98d6]) and a value of type [com.aspose.email.internal.ah.g] (value [com.aspose.email.internal.ah.g@4084bd36]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
25-Oct-2016 21:08:48.204 SEVERE [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@6d62ceca]) and a value of type [com.aspose.email.internal.al.j] (value [com.aspose.email.internal.al.j@64617339]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
25-Oct-2016 21:08:48.204 SEVERE [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@777a98d6]) and a value of type [com.aspose.email.internal.ah.g] (value [com.aspose.email.internal.ah.g@747be4ad]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
25-Oct-2016 21:08:48.204 SEVERE [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@6d62ceca]) and a value of type [com.aspose.email.internal.al.j] (value [com.aspose.email.internal.al.j@16f2d975]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
25-Oct-2016 21:08:48.207 SEVERE [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@777a98d6]) and a value of type [com.aspose.email.internal.ah.g] (value [com.aspose.email.internal.ah.g@73faab90]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
We will surely upgrade to the latest version, but I didn’t see anything regarding this issue in the changelog.