On 21/05/2025 13:44, Zdeněk Henek wrote:
Hello,
I am getting these errors in one of our systems:
java.lang.ClassCastException: class com.sun.mail.handlers.text_html cannot
be cast to class javax.activation.DataContentHandler
(com.sun.mail.handlers.text_html is in unnamed module of loader
org.apache.catalina.loader.ParallelWebappClassLoader @6c5398e5;
javax.activation.DataContentHandler is in unnamed module of loader
org.apache.catalina.loader.ParallelWebappClassLoader @719f9efd)
<snip/>
Any idea what is going on here?
Looks like javax.activation.DataContentHandler has been loaded by a web
application and then registered with something that has wider visibility
- probably JVM wide.
That causes problems when another web application tries to use it.
Why does this happen?
If is a form of memory leak.
The system with the error is still running. I could collect more
information if needed.
Remove javax.mail-1.6.2.jar and activation-1.1.jar from all web
applications.
Add those JARs to $CATALINA_BASE/lib
That way when they get loaded they'll be loaded by Tomcat's common
loader and visible to all web applications.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org