JavaMail Error: no object DCH for MIME type text/html

February 25, 2010

When using JavaMail to send an email, we got the following error at runtime:

javax.activation.UnsupportedDataTypeException: no object DCH for MIME type text/html

Googling around seems to imply problems with classloaders, or incompatible versions of javamail and activation.jar.

The problem was solved by putting a set of newly downloaded JavaMail jar files into Tomcat 5's common/lib directory.

I'm still not sure as to the cause of this, as there weren't any changes in classloaders or javamail jar versions. We were, however, in heavy development on the project and adding new JDBC drivers all the time.

Tags: javamail java