I am using OSGi and send email with javax.mail.
When I run it, it shows the following error:
javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/mixed;
On a web forum someone claims this to be due to JDK problems.
What is the problem here?
I think this might be fixed in JavaMail 1.4.4 (also try artefacts from the spring OSGi repository).
It’s because javax.activiation can’t see the content handlers specified by javax.mail in META-INF/mailcap
See this http://thecarlhall.wordpress.com/2009/10/27/javamail-in-osgi/
I can’t remember how I solved this before, it was a bit of hack, something like adding the javamail jar to the framework boot and adding it’s exports to org.osgi.framework.system.packages.extra